-
Notifications
You must be signed in to change notification settings - Fork 4
/
.pre-commit-config.yaml
36 lines (36 loc) · 1.31 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
repos:
# Sort order of Python imports
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
# Python code formatting
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
# Remove unused Python imports
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args: ["--in-place", "--remove-all-unused-imports"]
# Remove whitespace at line end, ensure newline at the end of files
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0 # Use the ref you want to point at
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
# Add C++ linting
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5
hooks:
- id: clang-format
args: ["--style=file", "-i"]
# - id: cppcheck
# args: ["--project=tdms/build/compile_commands.json"]
# - id: cpplint
# args: ["--filter=-whitespace/comments,-legal/copyright", "--linelength=120", "--quiet"]
# suppress whitespace because it conflicts with clang-tidy and doxygen
# suppress copyright in file headers because we don't require them in the developer docs
# run quietly so we don't see you doing this if everything is fine