pub struct ProjectConfig {
pub version: String,
pub default_definition: Option<String>,
pub default_ignore: Option<String>,
pub approver_name: Option<String>,
pub mask_secrets: bool,
pub custom_mask_patterns: Vec<String>,
pub suppress_warnings: Vec<String>,
}Expand description
The project-level configuration document.
Fields§
§version: StringSchema version. Currently "1".
default_definition: Option<String>Default audit definition path, relative to project root.
default_ignore: Option<String>Default .aaaiignore path, relative to project root.
approver_name: Option<String>Default approver name stamped on approvals (overridden by CLI flag).
mask_secrets: boolEnable secret masking by default.
custom_mask_patterns: Vec<String>Custom regex patterns added to the masking engine.
suppress_warnings: Vec<String>Warning kind IDs to suppress (e.g. [“no-approver”, “no-strategy”]). Suppressed warnings are not emitted even if the condition is met.
Implementations§
Source§impl ProjectConfig
impl ProjectConfig
Sourcepub fn load(path: &Path) -> Result<Option<Self>>
pub fn load(path: &Path) -> Result<Option<Self>>
Load from path. Returns None when the file does not exist.
Sourcepub fn discover(start_dir: &Path) -> Result<Option<(Self, PathBuf)>>
pub fn discover(start_dir: &Path) -> Result<Option<(Self, PathBuf)>>
Discover .aaai.yaml by walking up from start_dir.
Returns the config and the directory in which it was found.
Sourcepub fn save(&self, path: &Path) -> Result<()>
pub fn save(&self, path: &Path) -> Result<()>
Write to path, creating parent directories as needed.
Sourcepub fn is_warning_suppressed(&self, kind: &str) -> bool
pub fn is_warning_suppressed(&self, kind: &str) -> bool
Generate a starter config with helpful comments embedded as YAML string. Check if a warning kind is suppressed.
pub fn starter_yaml() -> &'static str
Trait Implementations§
Source§impl Clone for ProjectConfig
impl Clone for ProjectConfig
Source§fn clone(&self) -> ProjectConfig
fn clone(&self) -> ProjectConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProjectConfig
impl Debug for ProjectConfig
Source§impl Default for ProjectConfig
impl Default for ProjectConfig
Source§fn default() -> ProjectConfig
fn default() -> ProjectConfig
Source§impl<'de> Deserialize<'de> for ProjectConfig
impl<'de> Deserialize<'de> for ProjectConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ProjectConfig
impl RefUnwindSafe for ProjectConfig
impl Send for ProjectConfig
impl Sync for ProjectConfig
impl Unpin for ProjectConfig
impl UnsafeUnpin for ProjectConfig
impl UnwindSafe for ProjectConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more