pub enum FileContext {
Business,
Example,
Test,
Benchmark,
Documentation,
Config,
UI,
GPU,
Web,
}Expand description
File context type - used to adjust rule sensitivity
Variants§
Business
Business code (default) - normal detection intensity
Example
Example/demo code - 70% sensitivity reduction
Test
Test code - 80% sensitivity reduction
Benchmark
Performance benchmark code - 60% sensitivity reduction
Documentation
Documentation code - 90% sensitivity reduction
Config
Config files (non-Rust) - skip most rules
UI
UI/TUI application code - relaxed naming rules for coordinates, colors, etc.
GPU
GPU/graphics/system programming code - relaxed naming for indices, coordinates
Web
Web server/handler code - relaxed naming for request/response objects
Implementations§
Source§impl FileContext
impl FileContext
Sourcepub fn rule_weight_multiplier(&self) -> f64
pub fn rule_weight_multiplier(&self) -> f64
Returns the rule weight multiplier for this context (0.0 = skip completely, 1.0 = normal)
Sourcepub fn should_skip_rule(&self, rule_name: &str) -> bool
pub fn should_skip_rule(&self, rule_name: &str) -> bool
Determine whether a specific rule should be skipped
Trait Implementations§
Source§impl Clone for FileContext
impl Clone for FileContext
Source§fn clone(&self) -> FileContext
fn clone(&self) -> FileContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FileContext
impl Debug for FileContext
Source§impl Default for FileContext
impl Default for FileContext
Source§fn default() -> FileContext
fn default() -> FileContext
Returns the “default value” for a type. Read more
Source§impl PartialEq for FileContext
impl PartialEq for FileContext
Source§fn eq(&self, other: &FileContext) -> bool
fn eq(&self, other: &FileContext) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FileContext
Auto Trait Implementations§
impl Freeze for FileContext
impl RefUnwindSafe for FileContext
impl Send for FileContext
impl Sync for FileContext
impl Unpin for FileContext
impl UnsafeUnpin for FileContext
impl UnwindSafe for FileContext
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