Rule categories#
Safety (SC-S prefix) — dangerous operations, like UPDATE/DELETE without a WHERE clause and unqualified column references in a join. Example: SC-S01 (error) fires when an UPDATE has no WHERE, because it affects every row.
Naming (SC-N prefix) — identifier conventions. Example: SC-N01 (warn) flags column aliases that aren't snake_case.
Style (SC-T prefix) — cleaner SQL patterns, such as preferring explicit JOIN syntax over the implicit comma-join form.
Performance (SC-P prefix) — patterns that hurt query efficiency, including unbounded sorting and index-preventing predicates.
Antipattern (SC-A prefix) — common mistakes, like comparing against NULL with = instead of IS NULL.
Codegen (SC-C prefix) — validates code-generation annotations and query signatures before they reach the generator.
See the full rule table with every ID for the complete list, defaults, and descriptions.
Configuring severity#
Each rule runs at one of three levels: error (fails the command), warn (reported but the command still passes), or off (disabled). Category-level settings can be overridden per rule:
[lint.categories]
safety = "error"
[lint.rules]
"SC-S03" = "off"The per-rule override under [lint.rules] always wins over the category default.
sqruff integration#
Scythe integrates sqruff for formatting- and style-level rules, surfaced with an SQ- prefix. Configuration lives under [lint.sqruff], where per-rule entries only accept "off". LT01 is excluded by default in both scythe lint and scythe fmt due to an upstream sqruff issue with compound operators.
Related#
- Lint Rule Reference — every
SC-*rule ID, default severity, and trigger condition. - Security Audit — the 35
SC-SEC/SC-RLS/SC-MIG/SC-CHKrules that also run underscythe lint. - CLI Reference —
scythe lintflags, including--fixand--dialect.