-
Notifications
You must be signed in to change notification settings - Fork 5
/
.pre-commit-config.yaml
51 lines (51 loc) · 1.79 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
# 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: v3.2.0
hooks:
- id: check-yaml
name: Check YAML file formatting
- id: check-added-large-files
name: No large Files
description: Checks that you did not unconsciously upload some enormous file
- id: check-ast
name: Check Valid Python
description: check if python file is valid
- id: end-of-file-fixer
name: End of File Fix
description: Checks file ends on newline
- id: no-commit-to-branch
name: No direct commit to main
args: ['--branch', 'main']
description: Do not commit to main directly
- id: trailing-whitespace
name: Trim trailing whitespaces
description: Trailing whitespaces are trimmed
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.4
hooks:
- id: ruff
args: ["--ignore=E402"] # Ignore E402 error "Module level import not at top of file"
description: python linter
- id: ruff-format
description: python formatter
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.3.0
hooks:
- id: black-jupyter
description: formating ipynb notebook
- repo: https://gitlab.com/daverona/pre-commit/cpp
rev: 0.8.0
hooks:
- id: cpplint
args:
- --linelength=100
- --filter=-runtime/references,-readability/braces,-whitespace/indent_namespace,
-build/include,-build/c++11,-build/c++17
types_or: [c, c++, cuda]
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]