-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pre-commit-config.yaml
39 lines (35 loc) · 1.65 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
exclude: "tests/archive|src/borealis_experiments"
repos:
- repo: meta
hooks:
- id: check-hooks-apply # Check that all hooks apply to at least one file
- id: check-useless-excludes # Check that all excludes apply to at least one file
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: end-of-file-fixer # Ensures that files are either empty or end in newline
- id: trailing-whitespace # Trims trailing whitespace
- id: requirements-txt-fixer # Sorts entries in requirements.txt files (docs in our case)
- id: check-toml # Checks toml files for parseable syntax
- id: check-yaml # Checks yaml files for parseable syntax
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
hooks:
- id: ruff # linter
types_or: [ python, jupyter ]
args: [ --fix ]
- id: ruff-format # formatter
types_or: [ python, jupyter ]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks # Warns if single backticks used (e.g. `test` instead of ``test``)
- id: rst-directive-colons # Warns if rst directives either don't end in "::", or have space before "::"
- id: rst-inline-touching-normal # Warns if inline code is not properly separated from text
- repo: https://gitlab.com/daverona/pre-commit/cpp
rev: 0.8.0
hooks:
- id: clang-format # Formatter for C++ code based on a style guide (Google C++ guide default)
#- id: cpplint # Linter (style error-checker) for Google C++ style guide
- id: cppcheck # Static analyzer for C++ code
exclude: "tests"