pub struct SeverityConfig {
pub default: RuleSeverity,
pub warn: HashSet<String>,
pub ignore: HashSet<String>,
}Expand description
Rule severity configuration - controls how findings affect CI exit code.
Priority: ignore > warn > default
Example:
severity:
default: error # All rules are errors by default
warn:
- PI-001 # Treat as warning only
- PI-002
ignore:
- OP-001 # Completely ignoreFields§
§default: RuleSeverityDefault severity for all rules (error by default).
warn: HashSet<String>Rule IDs to treat as warnings (report only, exit 0).
ignore: HashSet<String>Rule IDs to ignore completely (no report). Note: These are merged with disabled_rules.
Implementations§
Source§impl SeverityConfig
impl SeverityConfig
Sourcepub fn get_rule_severity(&self, rule_id: &str) -> Option<RuleSeverity>
pub fn get_rule_severity(&self, rule_id: &str) -> Option<RuleSeverity>
Get the effective RuleSeverity for a rule ID. Returns None if the rule should be ignored.
Trait Implementations§
Source§impl Clone for SeverityConfig
impl Clone for SeverityConfig
Source§fn clone(&self) -> SeverityConfig
fn clone(&self) -> SeverityConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SeverityConfig
impl Debug for SeverityConfig
Source§impl Default for SeverityConfig
impl Default for SeverityConfig
Source§impl<'de> Deserialize<'de> for SeverityConfigwhere
SeverityConfig: Default,
impl<'de> Deserialize<'de> for SeverityConfigwhere
SeverityConfig: Default,
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SeverityConfig
impl RefUnwindSafe for SeverityConfig
impl Send for SeverityConfig
impl Sync for SeverityConfig
impl Unpin for SeverityConfig
impl UnwindSafe for SeverityConfig
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
Mutably borrows from an owned value. Read more