Repository navigation
Releases: Pawansingh3889/sql-sop
Release list
v0.11.0
What's Changed
- chore: remove Dependabot, pre-commit.ci and release-please by @Pawansingh3889 in #98
- docs: present sql-sop as a standalone project by @biggdawg320 in #110
- test: cover schema snapshot and contract validation commands by @biggdawg320 in #106
- fix(cli): report sql-sop in version output by @tolegm in #107
- docs: correct stale rule counts and document the dbt pack by @Pawansingh3889 in #109
- fix(cli): keep SARIF stdout clean by routing diagnostics to stderr by @LouisDeconinck in #114
- docs: remove duplicated README copy and correct stale figures by @Pawansingh3889 in #112
- build: add project URLs and sharpen PyPI metadata by @Pawansingh3889 in #113
- docs: update remaining sql-guard links to sql-sop by @HarshRajSinghania in #97
- fix: harden action inputs and reject option-like --changed-base by @Pawansingh3889 in #115
- chore: release 0.11.0 by @Pawansingh3889 in #119
New Contributors
- @tolegm made their first contribution in #107
- @LouisDeconinck made their first contribution in #114
- @HarshRajSinghania made their first contribution in #97
Full Changelog: v0.10.0...v0.11.0
v0.10.0
0.10.0 (2026-09-11)
Features
- rules: add DBT002 direct-table-ref (#75) (043307e)
- rules: add DBT003 incremental-without-unique-key (#76) (24bfdd0)
- rules: add DBT004 hook-with-ddl (#77) (0384a71)
- rules: add DBT005 select-star-in-mart (#80) (d597577)
- rules: add DBT006 model-without-description (#78) (848b00e)
- rules: add DBT007 unquoted-var-interpolation (#79) (f62e7b3)
- w025: support quoted assertion identifiers (#92) (7168dcf)
Bug Fixes
Documentation
Code Refactoring
v0.9.1
v0.9.0
v0.8.0
What's Changed
- docs: refresh README and action.yml for v0.7.0 (contracts pack, new c… by @Pawansingh3889 in #38
- feat(rules): add W021 having-without-group-by by @mvanhorn in #39
- Fix S001 implicit-cross-join false negatives (aliases, schema-qual, multi-line) by @Pawansingh3889 in #46
- Add E009 update-from-without-join (T-SQL implicit-join Cartesian risk) by @Pawansingh3889 in #47
- Add T006 select-into-without-typed-fields (T-SQL runtime schema inference) by @Pawansingh3889 in #48
- Add W024 select-distinct-suspicious (DISTINCT + JOIN band-aid heuristic) by @Pawansingh3889 in #49
- Replace strict Conventional Commits PR-title check with a sanity check by @Pawansingh3889 in #50
- chore: exclude test fixtures from the sql-sop dogfooding pre-commit hook by @Pawansingh3889 in #51
- chore: add Release Please workflow and ADR issue template by @Pawansingh3889 in #55
- chore(main): release 0.8.0 by @Pawansingh3889 in #56
Full Changelog: v0.7.0...v0.8.0
v0.7.0
v0.7.0 is the headline release for the Contracts theme: schema-aware linting via the new C001-C005 rule pack, two new CLI subcommands, and three community-contributed rules. No breaking changes. Without --contract the tool behaves identically to v0.6.x.
Highlights
Contracts pack (C001-C005)
Declare your expected schema in YAML and lint queries against it:
sql-sop check . --contract contract.yml
The five new rules:
- C001
column-not-in-contract(warning) — SQL references a column that is not declared in the contract for that table. - C002
table-not-in-contract(warning) — statement touches a table not declared in the contract. - C003
not-null-violation(error) — INSERT omits a column the contract marks as NOT NULL with no default. - C004
primary-key-missing-on-insert(error) — INSERT omits a primary-key column that has no default. - C005
unmapped-fk(warning) — JOIN predicate uses two columns the contract has no foreign-key relationship for.
Contract format is a thin subset of the open data-contract spec. Contract path can also live in .sql-guard.yml via a contract: field.
New subcommands
Bootstrap a contract from a live database (requires sql-sop[snapshot]):
sql-sop schema-snapshot --dsn "mssql+pyodbc://..." --output contract.yml
Validate the YAML before running rules (CI-friendly):
sql-sop validate-contract --contract contract.yml
schema-snapshot introspects tables, columns, PKs, FKs, and nullable flags via SQLAlchemy. validate-contract exits non-zero on parse failure, so a malformed contract fails fast in CI.
Community-contributed rules
- W014
case-without-else— warns when aCASE ... ENDblock has noELSEbranch. Walks token-by-token tracking nesting. Contributed by @hellozzm in #32. - W015
join-function-on-column— JOIN-side companion to W003. CatchesJOIN ... ON UPPER(o.email) = UPPER(c.email)patterns that defeat indexes. Contributed by @mvanhorn in #33. - W022
cross-join-explicit— flags explicitCROSS JOIN. Strips trailing line comments before matching. Contributed by @vibeyclaw in #31. - W023
scalar-udf-in-where— warns on schema-prefixed UDF calls inWHERE/HAVING/ONclauses, the canonical T-SQL scalar-UDF anti-pattern. Contributed by @mvanhorn in #34. Resolves #30.
Rule counts
- Core registry: 43 rules (10 errors, 28 warnings, 5 Python-source)
- With
--contract: 48 rules (12 errors, 31 warnings, 5 Python-source)
Backwards compatibility
No breaking changes. All Contracts-pack rules require an explicit --contract flag (or contract: field in .sql-guard.yml); silent without it. The [snapshot] extra is opt-in via pip install "sql-sop[snapshot]" so SQLAlchemy stays out of the core install.
Install
pip install sql-sop==0.7.0
For the schema-snapshot subcommand: pip install "sql-sop[snapshot]==0.7.0"
For the pre-commit hook, set rev: v0.7.0 in your .pre-commit-config.yaml.
What's Changed
- feat(rules): add W023 scalar-udf-in-where by @mvanhorn in #34
- feat(rules): add W015 join-function-on-column by @mvanhorn in #33
- feat: add W014 case-without-else rule by @hellozzm in #32
- feat: add W022 cross-join-explicit rule by @vibeyclaw in #31
- feat: contracts pack (C001-C005) + schema-snapshot + validate-contract subcommands by @Pawansingh3889 in #35
- chore: release v0.7.0 contracts pack, schema-snapshot, validate-contract by @Pawansingh3889 in #36
New Contributors
- @hellozzm made their first contribution in #32
- @vibeyclaw made their first contribution in #31
Full Changelog: v0.6.2...v0.7.0
v0.6.2
What's Changed
- feat(rules): warn on OVER () by @Prabhu-1409 in #21
New Contributors
- @Prabhu-1409 made their first contribution in #21
Full Changelog: v0.6.1...v0.6.2
v0.6.1
What's Changed
Full Changelog: v0.6.0...v0.6.1
v0.6.0
What's Changed
- feat(rules): add W016 not-in-with-subquery rule by @mvanhorn in #26
- feat(rules): add P005 sqlalchemy-text-fstring rule by @tmchow in #25
Full Changelog: v0.5.0...v0.6.0
v0.5.0
What's Changed
- feat(rules): add W011 union-without-all warning rule by @tmchow in #12
- fix(tests): make test_duration_tracked robust on fast hardware by @Pawansingh3889 in #13
- chore: architecture cleanup (version, deps, README consistency) by @Pawansingh3889 in #15
- ci(prsop): wire pr-sop for PR governance checks by @Pawansingh3889 in #17
- feat(rules): add W012 group-by-ordinal by @mvanhorn in #14
- ci(prsop): bump to v0.1.1 and re-enable .pre-commit-config.yaml check by @Pawansingh3889 in #18
- ci(prsop): bump to v0.1.2 by @Pawansingh3889 in #20
- feat: add T-SQL rules T001-T004 and FETCH NEXT pagination support by @Pawansingh3889 in #23
- chore: release v0.5.0 with T-SQL rules by @Pawansingh3889 in #24
New Contributors
- @tmchow made their first contribution in #12
- @Pawansingh3889 made their first contribution in #13
- @mvanhorn made their first contribution in #14
Full Changelog: v0.4.1...v0.5.0