-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
73 lines (73 loc) · 2.19 KB
/
.pre-commit-config.yaml
File metadata and controls
73 lines (73 loc) · 2.19 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
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: local
hooks:
- id: clang-format
name: clang-format
description: Format C++ files with clang-format.
language: system
files: \.(h|cpp)$
entry: clang-format -i
- id: cmake-format
name: cmake-format
description: Format CMake files with cmake-format.
language: system
files: (CMakeLists.txt|.*\.cmake)$
exclude: source_list.cmake
entry: poetry run cmake-format -i
- id: update-source-list
name: update-source-list
description: Update the list of source codes.
language: system
files: \.(h|cpp)$
entry: poetry run python scripts/update_source_list.py
pass_filenames: false
- id: check-encoding
name: check-encoding
description: Check encoding of files.
language: system
entry: poetry run python scripts/check_encoding.py
exclude: \.png|\.ico
- id: black
name: black
entry: poetry run black
language: system
require_serial: true
types_or: [python, pyi]
- id: isort
name: isort
entry: poetry run isort
language: system
require_serial: true
types_or: [python, pyi]
- id: pylint
name: pylint
entry: poetry run pylint
language: system
require_serial: true
types_or: [python]
exclude: \.cmake-format\.py
- id: flake8
name: flake8
entry: poetry run flake8
language: system
require_serial: true
types_or: [python]
exclude: \.cmake-format\.py
- id: mypy
name: mypy
entry: poetry run mypy
language: system
require_serial: true
types_or: [python]
exclude: \.cmake-format\.py|conftest\.py
# Automatically generated files should not be checked.
exclude: "\\.approved\\."