-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
83 lines (83 loc) · 2.53 KB
/
.pre-commit-config.yaml
File metadata and controls
83 lines (83 loc) · 2.53 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# See https://pre-commit.com for more information
default_stages: [pre-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pycqa/isort
rev: 7.0.0
hooks:
# Run isort to check only (don't modify files)
- id: isort
name: "Check imports are sorted"
args: [--check-only, --filter-files]
stages: [pre-commit]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.14
hooks:
# Run the linter to check only (don't modify files)
- id: ruff-check
name: "Check code is linted with ruff"
# Disabled flake8 - ruff covers the same checks with better performance
# - repo: https://github.com/PyCQA/flake8
# rev: 7.3.0
# hooks:
# - id: flake8
# name: "Check code is linted with flake8"
# additional_dependencies: [flake8-pyproject]
- repo: https://github.com/crate-ci/typos
rev: v1.33.1
hooks:
- id: typos
name: "Check files for typos"
stages: [pre-commit]
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.20.0
hooks:
- id: markdownlint-cli2
name: "Check markdown files"
stages: [pre-commit]
exclude: '^(devito_repo/|venv/|devito-plan\.md)'
#
# These stages modify the files applying fixes where possible
# Since this may be undesirable they will not run automatically
# These stages can be run with
# pre-commit run --hook-stage manual
#
- repo: https://github.com/pycqa/isort
rev: 7.0.0
hooks:
# Run isort to check only (don't modify files)
- id: isort
name: "Fix imports with isort"
args: [--filter-files]
stages: [manual]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.14
hooks:
# Run the linter to check only (don't modify files)
- id: ruff-check
name: "Fix linting errors with ruff check --fix"
args: [--fix]
stages: [manual]
- repo: https://github.com/crate-ci/typos
rev: v1.33.1
hooks:
- id: typos
name: "Fix typos"
args: [-w]
stages: [manual]
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.20.0
hooks:
- id: markdownlint-cli2
name: "Fix markdown files"
args: [--fix]
stages: [manual]
exclude: '^(devito_repo/|venv/|devito-plan\.md)'