-
Notifications
You must be signed in to change notification settings - Fork 40
/
.pre-commit-config.yaml
118 lines (118 loc) · 3.16 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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: ^reacnetgenerator/static/webpack/\.yarn/releases/.*$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: ^conda/recipe/meta\.yaml$
- id: check-json
- id: check-added-large-files
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: mixed-line-ending
# Python
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
- id: ruff
args: ["--fix"]
types_or: [python, pyi, jupyter]
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.3.1"
hooks:
- id: tox-ini-fmt
# numpydoc
- repo: https://github.com/Carreau/velin
rev: 0.0.12
hooks:
- id: velin
args: ["--write"]
# C++
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.5
hooks:
- id: clang-format
# Cython
- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.16.2
hooks:
- id: cython-lint
- id: double-quote-cython-strings
# markdown, json, yaml, CSS, javascript, html
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [markdown, yaml, css, html]
# workflow files cannot be modified by pre-commit.ci
exclude: ^conda/recipe/meta\.yaml|\.github/workflows
# CMake
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
- repo: https://github.com/njzjz/mirrors-bibtex-tidy
rev: v1.13.0
hooks:
- id: bibtex-tidy
args:
- --curly
- --numeric
- --align=13
- --blank-lines
- --sort=key
- --duplicates=key,doi,citation,abstract
- --merge=combine
- --sort-fields
- --strip-comments
- --trailing-commas
- --encode-urls
- --remove-empty-fields
- --wrap=80
# license header
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
# C++, js
- id: insert-license
files: \.(c|cc|cpp|js|ts)$
args:
- --license-filepath
- .license-header.txt
- --comment-style
- //
- --no-extra-eol
# CSS
- id: insert-license
files: \.(css|scss)$
args:
- --license-filepath
- .license-header.txt
- --comment-style
- /*| *| */
- --no-extra-eol
# Python
- id: insert-license
files: \.(py|pyx)$
args:
- --license-filepath
- .license-header.txt
- --comment-style
- "#"
- --no-extra-eol
# HTML
- id: insert-license
files: \.(html|vue|xml)$
args:
- --license-filepath
- .license-header.txt
- --comment-style
- <!--| ~| -->
- --no-extra-eol