pub struct NamingChaosDetector;Expand description
Detects NamingChaos signal: single-letter vars, terrible/meaningless names, Hungarian notation, and abbreviation abuse.
Implementations§
Trait Implementations§
Source§impl Default for NamingChaosDetector
impl Default for NamingChaosDetector
Source§impl SignalDetector for NamingChaosDetector
impl SignalDetector for NamingChaosDetector
fn signal(&self) -> StyleSignal
fn supported_languages(&self) -> &'static [Language]
Source§fn count_violations(&self, file: &ParsedFile) -> usize
fn count_violations(&self, file: &ParsedFile) -> usize
Run detection on a parsed file. Returns the number of signal violations found.
Source§fn count_violations_with_ir(&self, ir: &StyleIr, _file: &ParsedFile) -> usize
fn count_violations_with_ir(&self, ir: &StyleIr, _file: &ParsedFile) -> usize
Run detection using a pre-computed StyleIr (avoids redundant from_parsed calls).
Default: falls back to count_violations which recomputes the IR.
Source§fn skips_test_files(&self) -> bool
fn skips_test_files(&self) -> bool
Whether this detector should be skipped for test files.
Override to
false for signals that apply to test code too.Source§fn detect_findings(
&self,
file: &ParsedFile,
is_test_file: bool,
skip_tests_config: bool,
) -> Vec<(StyleSignal, usize)>
fn detect_findings( &self, file: &ParsedFile, is_test_file: bool, skip_tests_config: bool, ) -> Vec<(StyleSignal, usize)>
Produce per-file signal findings with violation counts. Read more
Source§fn detect_findings_with_ir(
&self,
ir: &StyleIr,
file: &ParsedFile,
is_test_file: bool,
skip_tests_config: bool,
) -> Vec<(StyleSignal, usize)>
fn detect_findings_with_ir( &self, ir: &StyleIr, file: &ParsedFile, is_test_file: bool, skip_tests_config: bool, ) -> Vec<(StyleSignal, usize)>
Produce per-file signal findings using a pre-computed StyleIr.
Auto Trait Implementations§
impl Freeze for NamingChaosDetector
impl RefUnwindSafe for NamingChaosDetector
impl Send for NamingChaosDetector
impl Sync for NamingChaosDetector
impl Unpin for NamingChaosDetector
impl UnsafeUnpin for NamingChaosDetector
impl UnwindSafe for NamingChaosDetector
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