pub struct RuleEngine { /* private fields */ }Implementations§
Source§impl RuleEngine
impl RuleEngine
pub fn new() -> Self
pub fn with_skip_comments(self, skip: bool) -> Self
Sourcepub fn with_strict_secrets(self, strict: bool) -> Self
pub fn with_strict_secrets(self, strict: bool) -> Self
Enable strict secrets mode (disable test file heuristics)
pub fn with_dynamic_rules(self, rules: Vec<DynamicRule>) -> Self
pub fn add_dynamic_rules(&mut self, rules: Vec<DynamicRule>)
Sourcepub fn get_all_rules(&self) -> &[Rule]
pub fn get_all_rules(&self) -> &[Rule]
Get all builtin rules
pub fn check_content(&self, content: &str, file_path: &str) -> Vec<Finding>
Sourcepub fn is_comment_line(line: &str) -> bool
pub fn is_comment_line(line: &str) -> bool
Detects if a line is a comment based on common programming language patterns. Supports: #, //, –, ;, %, and <!– for HTML/XML comments.
pub fn check_frontmatter( &self, frontmatter: &str, file_path: &str, ) -> Vec<Finding>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuleEngine
impl RefUnwindSafe for RuleEngine
impl Send for RuleEngine
impl Sync for RuleEngine
impl Unpin for RuleEngine
impl UnwindSafe for RuleEngine
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