pub struct LanguageCapabilityMatrix;Expand description
Tracks which StyleSignals are detectable per language.
This matrix answers “Can we detect signal X in language Y?” through two paths:
supported_signals()— via classify_rule on issue rule namesdirect_signals()— via SignalDetector (direct AST analysis)
All languages with a tree-sitter grammar currently support all 7 signals through the cross-language rules (deep-nesting, long-function, god-function, file-too-long, todo-comment, commented-code, dead-code, terrible-naming, single-letter-variable, meaningless-naming, hungarian-notation, abbreviation-abuse, magic-number, println-debugging). Language-specific rules add precision but don’t expand the signal set.
Implementations§
Source§impl LanguageCapabilityMatrix
impl LanguageCapabilityMatrix
Sourcepub fn supported_signals(lang: Language) -> &'static [StyleSignal]
pub fn supported_signals(lang: Language) -> &'static [StyleSignal]
Returns StyleSignals that have at least one rule for this language.
Sourcepub fn direct_signals(lang: Language) -> &'static [StyleSignal]
pub fn direct_signals(lang: Language) -> &'static [StyleSignal]
Returns signals that have a direct SignalDetector implementation.
Sourcepub fn supports_signal(lang: Language, signal: StyleSignal) -> bool
pub fn supports_signal(lang: Language, signal: StyleSignal) -> bool
Returns true if the given signal is detectable for this language.
Sourcepub fn has_direct_detector(lang: Language, signal: StyleSignal) -> bool
pub fn has_direct_detector(lang: Language, signal: StyleSignal) -> bool
Returns true if the given signal has a direct detector for this language.