Skip to content

Commit

Permalink
build: add sqlfluff sql lint and fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Jun 5, 2024
1 parent 58947db commit 2573240
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ repos:
# Run the formatter
- id: ruff-format

# Lint & Autoformat: SQL
- repo: https://github.com/sqlfluff/sqlfluff
rev: 3.0.7
hooks:
- id: sqlfluff-lint
files: ^fmtm_splitter/.*\.sql$
types: [sql]
- id: sqlfluff-fix
files: ^fmtm_splitter/.*\.sql$
types: [sql]

# Autoformat: YAML, JSON, Markdown, etc.
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,8 @@ ignore = ["N805", "B008"]
[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.sqlfluff.core]
dialect = "postgres"

[project.scripts]
fmtm-splitter = "fmtm_splitter.splitter:main"

0 comments on commit 2573240

Please sign in to comment.