pub struct RulesConfig {
pub global_allow: Vec<String>,
pub sarif_tools: Vec<SarifTool>,
pub rules: HashMap<String, RuleOverride>,
}Expand description
Rules configuration covering all engines (syntax, fact, native, sarif).
Deserialized from [rules] in .normalize/config.toml. Per-rule overrides
live under [rules.rule."<id>"]. Engine-wide settings live as bare keys
directly under [rules] (e.g. global-allow, sarif-tools).
Legacy layout ([rules."<id>"] directly under [rules]) is still parsed
for one release with a stderr deprecation warning. It is unsound in principle
because a rule named global-allow would collide with the engine-wide key —
the new nested layout removes the namespace collision.
Fields§
§global_allow: Vec<String>Allow patterns applied to every rule (e.g. ["**/tests/fixtures/**"]).
Entries here skip violations in matching files across all rules.
sarif_tools: Vec<SarifTool>External tools that emit SARIF 2.1.0 output (the sarif engine).
rules: HashMap<String, RuleOverride>Per-rule configuration overrides, keyed by rule ID.
Serialized under the rule sub-table ([rules.rule."<id>"]). On
deserialization, both the new nested layout and the legacy flat layout
([rules."<id>"]) are accepted; the legacy form emits a stderr
deprecation warning.
Trait Implementations§
Source§impl Clone for RulesConfig
impl Clone for RulesConfig
Source§fn clone(&self) -> RulesConfig
fn clone(&self) -> RulesConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RulesConfig
impl Debug for RulesConfig
Source§impl Default for RulesConfig
impl Default for RulesConfig
Source§fn default() -> RulesConfig
fn default() -> RulesConfig
Source§impl<'de> Deserialize<'de> for RulesConfig
impl<'de> Deserialize<'de> for RulesConfig
Source§fn deserialize<D>(
deserializer: D,
) -> Result<RulesConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<RulesConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl JsonSchema for RulesConfig
impl JsonSchema for RulesConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Merge for RulesConfig
impl Merge for RulesConfig
Source§fn merge(self, other: RulesConfig) -> RulesConfig
fn merge(self, other: RulesConfig) -> RulesConfig
Merge two RulesConfig values, with other taking priority.
- Vec fields (
global_allow,sarif_tools): ifother’s field is non-empty it replacesself’s field; an emptyotherfield inherits fromself. This means you cannot reset a Vec to empty via merge — an emptyothervec is treated as “no override” rather than “clear the list”. rulesHashMap: merged usingextend, soother’s keys overrideself’s keys. Keys present only inselfare preserved.
Source§impl Serialize for RulesConfig
impl Serialize for RulesConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for RulesConfig
impl RefUnwindSafe for RulesConfig
impl Send for RulesConfig
impl Sync for RulesConfig
impl Unpin for RulesConfig
impl UnsafeUnpin for RulesConfig
impl UnwindSafe for RulesConfig
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.