Skip to main content

Module disable

Module disable 

Source

Constants§

UNUSED_DISABLE_RULE_ID
Internal rule id for a disable directive that suppressed nothing, reported only when --report-unused-disable is set. Not a YAML rule.

Functions§

filter_disabled
Filter out findings that are suppressed by // slopguard-disable-next-line comments in the source code.
is_disabled
Whether a // slopguard-disable-next-line directive suppresses rule_id on 1-based line of source. A directive with no rule id suppresses every rule; one naming a rule suppresses only that rule. Mirrors the filtering in filter_disabled for callers that hold a position rather than a finding (the --fix pass).
unused_disable_findings
Report the disable directives in source that suppressed nothing, given the file’s raw (pre-suppression) findings.