Skip to content
Michael L. McKnight edited this page Dec 5, 2026 · 2 revisions

Rules

Canonical source: docs/rules.md. That file is generated from the source by python scripts/gen_rules_doc.py and should not be edited by hand. After adding or changing rules, regenerate it; CI fails when it is stale.

320 rule ids in total, in three groups:

Group Count
v1.2 rules (explicit ids) 63
Opt-in style rules (always INFO) 72
Rules with derived ids (v1.0/v1.1) 185

Every finding carries a rule id (Issue.effective_rule_id; JSON rule_id; SARIF ruleId). Use it with --disable-rule ID or disabled_rules in the Python API.

Rules whose id contains / are the older v1.0/v1.1 rules: their id is derived from the category and message. Runtime parts of the message are shown as {...} in the doc; where such a part ends up in the id it is shown as * (for example security/hardcoded-* covers security/hardcoded-password, security/hardcoded-token, and similar).

Severity is the severity at the report site. Taint Tracking can raise the severity of a security finding on the same line; context such as literal-only arguments can lower it.

Highlights

  • AI-mistake checks include ai-hallucinated-import, ai-hallucinated-attribute, placeholders and stubs, TODOs, leftover debug output, and hardcoded secrets (ai-secret-token, ai-private-key, …).
  • Taint rules use the taint-* prefix (taint-sql-injection, taint-command-injection, taint-code-injection, and others). See Taint Tracking.
  • SCRAWL rules use the scrawl-* prefix (40 rules), including compile errors, labels, vote forms, Darmok idioms, and VM traps. See SCRAWL.
  • Style rules are off by default, always INFO, and are enabled with --style-rules or --enable-rule ID.

Look up a specific id, its default severity, category, languages, and source file in docs/rules.md.

Inline suppression comments such as # code-cleaner: ignore[rule-id] are not in v1.4.0; they are an open issue (#2). Until then, use --disable-rule.

Clone this wiki locally