-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
When introducing sqruff to an existing codebase, there are often many pre-existing lint errors. Requiring all errors to be fixed before CI can pass creates a high barrier to adoption.
Prior art
Several popular linters have implemented baseline functionality:
- PHPStan (PHP) -
phpstan analyse --generate-baselinecreatesphpstan-baseline.neon - Psalm (PHP) -
psalm --set-baseline=psalm-baseline.xmlcreates XML baseline - RuboCop (Ruby) -
rubocop --auto-gen-configcreates.rubocop_todo.yml - Ruff (Python, also Rust-based) - supports
--baselineflag - ESLint (JavaScript) - feature request #13437; third-party solutions like eslint-baseline exist
- SARB - generic Static Analysis Results Baseliner that works with multiple tools
Notably, SQLFluff (the Python linter sqruff is based on) does not have native baseline support, relying instead on -- noqa comments or downgrading rules to warnings. Native baseline support would be a differentiating feature for sqruff.
Since sqruff and Ruff are both Rust-based linters, Ruff's approach may (or may not) translate well to sqruff.
Benefits
- Lower barrier to adoption for existing projects
- Enables incremental improvement
- Prevents regressions while allowing legacy issues to be addressed over time
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels