-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
62 lines (59 loc) · 1.67 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
repos:
# Versioning: Commit messages & changelog
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.1.0
hooks:
- id: commitizen
stages: [commit-msg]
# Lint / autoformat: Python code
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: "v0.8.3"
hooks:
# Run the linter
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter
- id: ruff-format
# Lint & Autoformat: SQL
- repo: https://github.com/sqlfluff/sqlfluff
rev: 3.3.0
hooks:
- id: sqlfluff-lint
files: ^fmtm_splitter/fmtm_algorithm.sql
# files: ^fmtm_splitter/.*\.sql$
types: [sql]
- id: sqlfluff-fix
files: ^fmtm_splitter/fmtm_algorithm.sql
# 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
hooks:
- id: prettier
entry: env PRETTIER_LEGACY_CLI=1 prettier
args:
[
--ignore-unknown,
--no-error-on-unmatched-pattern,
"!fmtm-splitter/fmtm-splitter_osm_buildings/**",
"!contrib/postgis_snippets/**",
"!CHANGELOG.md",
"!tests/testdata/*",
]
# Lint: Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.43.0
hooks:
- id: markdownlint
args:
[
--fix,
--ignore,
CHANGELOG.md,
--ignore,
contrib/postgis_snippets/**/*.md,
--ignore,
fmtm_splitter/fmtm-splitter_osm_buildings/*.md,
]