Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# Runs sql-sop on the project's own fixtures + any staged .sql files
# so a regression in a rule is caught before it ships.
- repo: https://github.com/Pawansingh3889/sql-guard
rev: v0.6.2
rev: v0.7.0

Check warning on line 31 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / PR governance

precommit-rev-matches-tag

`rev: v0.7.0` does not match latest git tag `v0.6.2`.
hooks:
- id: sql-sop
args: [--severity, error]
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ a deprecation window (see `GOVERNANCE.md` § Scope discipline).

## [Unreleased]

_Nothing yet. Next release will track post-v0.7.0 work._

## [0.7.0] - 2026-05-02

Headline release: schema-aware linting via the new **Contracts pack**, three community-contributed rules (W014 / W015 / W022), and the `schema-snapshot` and `validate-contract` subcommands. Core registry is 43 rules (10 errors, 28 warnings, 5 Python-source). With `--contract` enabled the registry grows to 48 rules (12 errors, 31 warnings, 5 Python-source). Without `--contract` behaviour is identical to v0.6.x and there are no breaking changes.

### Added

- **W014 `case-without-else`** - warns when a `CASE ... END` block has
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

| | |
|---|---|
| Rules | 43 (10 errors, 28 warnings, 5 Python-source) |
| Tests | 152 |
| Rules | 43 (10 errors, 28 warnings, 5 Python-source); 48 with `--contract` |
| Tests | 210 |
| Coverage | 86% |
| Scan speed | 0.08s across 200 files |
| PyPI downloads | 500+/month |
| Version | 0.6.2 |
| Version | 0.7.0 |

### Fluent API (v0.2.0)

Expand All @@ -43,7 +43,7 @@

---

Fast, rule-based SQL linter. 43 rules (38 SQL + 5 Python), including SQL Server-focused rules for T-SQL shops. Inline disable, project config, git-changed-only mode, and SARIF output for GitHub Code Scanning. 500+ monthly downloads on PyPI.
Fast, rule-based SQL linter. 43 rules (38 SQL + 5 Python), with an optional Contracts pack (5 schema-aware rules) when you supply `--contract path.yml`. SQL Server-focused rules for T-SQL shops. Inline disable, project config, git-changed-only mode, and SARIF output for GitHub Code Scanning. 500+ monthly downloads on PyPI.

Catches dangerous SQL before it reaches production -- DELETE without WHERE, UPDATE without WHERE, SQL injection patterns, SELECT *, and 20 more. Runs as a **CLI tool**, **pre-commit hook**, and **GitHub Action**.

Expand Down Expand Up @@ -132,7 +132,7 @@
# .pre-commit-config.yaml
repos:
- repo: https://github.com/Pawansingh3889/sql-guard
rev: v0.6.2
rev: v0.7.0

Check warning on line 135 in README.md

View workflow job for this annotation

GitHub Actions / PR governance

precommit-rev-matches-tag

`rev: v0.7.0` does not match latest git tag `v0.6.2`.
hooks:
- id: sql-guard
args: [--severity, error] # only block on errors locally
Expand Down
11 changes: 8 additions & 3 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@

This is the maintainer's working roadmap. It tells you what's likely to land in upcoming releases, what's deliberately out of scope, and where contributions are most welcome. It's a living document — open an issue to discuss anything that surprises you.

Last updated: 2026-04-27.
Last updated: 2026-05-02.

## Current release

**v0.6.x** is in maintenance. Headline features as of v0.6.1 on PyPI: 38 rules (33 SQL + 5 Python), T-SQL safety pack (T001-T005), migration guards, inline `-- sql-guard: disable=...` directives, `.sql-guard.yml` config, `--changed-only` flag, SARIF 2.1.0 output for GitHub Code Scanning, libCST scanner for Python source.
**v0.7.0** is the current PyPI release. Headline additions over v0.6.x:

`main` is at 39 rules after [W013 window-without-partition](https://github.com/Pawansingh3889/sql-guard/pull/21) merged 2026-04-26. **v0.6.2 patch release pending** to ship W013 to PyPI users.
- **Contracts pack (C001-C005)** — schema-aware linting against a YAML data contract. Opt-in via `--contract path.yml`; silent without it.
- **`schema-snapshot` subcommand** — bootstrap a contract from a live database via SQLAlchemy introspection. Requires the `[snapshot]` extra.
- **`validate-contract` subcommand** — validate the contract YAML before running rules, CI-friendly.
- Three community-contributed rules: **W014 `case-without-else`** (@hellozzm), **W015 `join-function-on-column`** (@mvanhorn), **W022 `cross-join-explicit`** (@vibeyclaw).

Total: 43 rules in the core registry (10 errors, 28 warnings, 5 Python-source), growing to 48 (12 errors, 31 warnings, 5 Python-source) when `--contract` is supplied.

## v0.7 — Performance Rules Pack

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "sql-sop"
version = "0.6.2"
version = "0.7.0"
description = "Fast rule-based SQL linter. Pre-commit hook + GitHub Action + CLI."
readme = "README.md"
license = "MIT"
Expand Down
Loading