pub struct Rule {Show 14 fields
pub id: RuleId,
pub language: Language,
pub severity: Severity,
pub message: String,
pub note: Option<String>,
pub category: Option<Category>,
pub fix: Option<String>,
pub rule: Value,
pub files: Option<Vec<String>>,
pub ignores: Option<Vec<String>>,
pub enabled: bool,
pub skip_test_code: bool,
pub tests: Option<RuleTests>,
pub ai_check: Option<AiCheck>,
}Fields§
§id: RuleId§language: Language§severity: Severity§message: String§note: Option<String>§category: Option<Category>§fix: Option<String>§rule: Value§files: Option<Vec<String>>§ignores: Option<Vec<String>>§enabled: boolDrop findings located inside #[cfg(test)] blocks of scanned Rust files.
Complements ignores, which only filters whole files by path.
skip_test_code: bool§tests: Option<RuleTests>§ai_check: Option<AiCheck>When set, matches of rule are candidates confirmed by an LLM before
being reported. See AiCheck. The AST scanner ignores this field.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rule
impl<'de> Deserialize<'de> for Rule
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 Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
Converts
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> ⓘ
Converts
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