mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
Initial implementation of policy coverage (#146)
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
bdb2aba596
commit
f3d9652a73
15
src/lib.rs
15
src/lib.rs
@@ -339,6 +339,21 @@ impl std::fmt::Debug for dyn Extension {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "coverage")]
|
||||
pub mod coverage {
|
||||
#[derive(Default, serde::Serialize, serde::Deserialize, Eq, PartialEq)]
|
||||
pub struct PolicyFile {
|
||||
pub path: String,
|
||||
pub code: String,
|
||||
pub uncovered: std::collections::BTreeSet<u32>,
|
||||
}
|
||||
|
||||
#[derive(Default, serde::Serialize, serde::Deserialize, Eq, PartialEq)]
|
||||
pub struct Report {
|
||||
pub files: Vec<PolicyFile>,
|
||||
}
|
||||
}
|
||||
|
||||
/// Items in `unstable` are likely to change.
|
||||
#[doc(hidden)]
|
||||
pub mod unstable {
|
||||
|
||||
Reference in New Issue
Block a user