@@ -42,24 +42,40 @@ uv run pytest
4242
4343### Linting & Formatting
4444``` bash
45- # Format code
46- uv run nox -s fmt
45+ # Format code with Ruff
46+ uv run nox -s fmt -- --ruff
47+
48+ # Format SQL files with SQLFluff
49+ uv run nox -s fmt -- --sqlfluff
50+
51+ # Format both Python and SQL
52+ uv run nox -s fmt -- --ruff --sqlfluff
4753
4854# Lint with both Pyright and Ruff
4955uv run nox -s lint -- --pyright --ruff
5056
57+ # Lint with all tools (Pyright, Ruff, SQLFluff)
58+ uv run nox -s lint -- --pyright --ruff --sqlfluff
59+
5160# Lint with Pyright only
5261uv run nox -s lint -- --pyright
5362
5463# Lint with Ruff only
5564uv run nox -s lint -- --ruff
5665
66+ # Lint SQL files only
67+ uv run nox -s lint -- --sqlfluff
68+
5769# Run Ruff directly
5870uv run ruff check . --fix
5971uv run ruff format .
6072
6173# Run Pyright directly
6274uv run pyright
75+
76+ # Run SQLFluff directly
77+ uv run sqlfluff lint .
78+ uv run sqlfluff fix .
6379```
6480
6581### Pre-commit Hooks
@@ -164,6 +180,12 @@ Tests in `tests/tools/` mirror the package structure:
164180- Reports: HTML + terminal
165181- Import mode: importlib
166182
183+ ** SQLFluff (.sqlfluff)** :
184+ - Dialect: BigQuery
185+ - Max line length: 80
186+ - Tab space size: 2
187+ - Custom rules for join qualification and unused joins
188+
167189### Nox Task Automation
168190
169191The ` noxfile.py ` uses a custom ` CLIArgs ` parser (Pydantic-based):
@@ -181,6 +203,8 @@ def lint(session: nox.Session) -> None:
181203 session.run(" uv" , " run" , " pyright" )
182204 if args.ruff:
183205 session.run(" uv" , " run" , " ruff" , " check" , " ." , " --fix" )
206+ if args.sqlfluff:
207+ session.run(" uv" , " run" , " sqlfluff" , " lint" , " ." )
184208```
185209
186210## Key Patterns for Development
0 commit comments