-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy path.pre-commit-config.yaml
51 lines (51 loc) · 2.1 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
---
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
hooks:
- id: ruff
args: [--fix, --show-fixes, --output-format, grouped]
- id: ruff-format
# Lint Python snippets embedded in Markdown (using flake8)
- repo: https://github.com/johnfraney/flake8-markdown
rev: v0.6.0
hooks:
- id: flake8-markdown
# # Lint Jinja2 templates
# - repo: https://github.com/thibaudcolas/curlylint
# rev: "v0.13.1"
# hooks:
# - id: curlylint
# Lint Yaml files
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args: ['-c', '.yamllint']
# Common pre-commit checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files # We don't want huge files. (Cut down test data!)
args: ['--maxkb=2000']
- id: check-case-conflict # Don't allow files that differ by case sensitivity.
- id: check-docstring-first # Avoid common error of code before docstring.
- id: check-json # Check json file syntax
# (Exclude Typescript config: it uses json5 extensions)
exclude: 'tsconfig.json|^integration_tests/schemas/'
- id: check-merge-conflict # Don't commit merge-conflicts
- id: check-symlinks # Symlinks that don't point to anything?
- id: check-yaml # Check Yaml file syntax
args: [--allow-multiple-documents]
- id: debug-statements # Avoid commiting debug/breakpoints
- id: end-of-file-fixer # Normalise on exactly one newline
exclude: '^integration_tests/schemas/'
- id: fix-byte-order-marker # No UTF-8 byte order marks
- id: mixed-line-ending # Don't allow mixed line endings
- id: pretty-format-json
args: ['--no-sort-keys', '--indent=4', '--autofix']
# (Exclude Typescript config: it uses json5 extensions)
exclude: 'tsconfig.json|^integration_tests/schemas/'
- id: requirements-txt-fixer # Keep requirements files sorted.
- id: trailing-whitespace # Auto remove trailing whitespace
exclude: '^integration_tests/schemas/'