Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
152 lines (151 loc) · 4.2 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
152 lines (151 loc) · 4.2 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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# exclude files which are auto-generated by build tools
exclude: |
(?x)^(
build|
dist|
external_libs|
lightgbm-python|
lightgbm_r|
\.pixi|
\.venv|
)$
|R-package/configure$
|R-package/inst/Makevars$
|R-package/inst/Makevars.win$
|R-package/man/.*Rd$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-executables-have-shebangs
- id: check-added-large-files
args: ["--maxkb=2500"]
- id: check-case-conflict
- id: check-illegal-windows-names
- id: check-json
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-xml
- id: fix-byte-order-marker
exclude: ^windows/.*$
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.38.2
hooks:
- id: check-dependabot
- id: check-readthedocs
- repo: https://github.com/cmake-lint/cmake-lint
rev: '1.4.3'
hooks:
- id: cmakelint
args: ["--linelength=120"]
- repo: https://github.com/cpplint/cpplint
rev: '2.0.2'
hooks:
- id: cpplint
args:
- --root=.. # workaround to get correct header guard pattern
- --recursive
- --filter=-build/include_subdir,-whitespace/line_length
- repo: local
hooks:
- id: check-omp-pragmas
name: check-omp-pragmas
entry: sh
args:
- .ci/check-omp-pragmas.sh
language: system
pass_filenames: false
- id: update-version
name: update-version
entry: sh
args:
- .ci/update-version.sh
language: system
pass_filenames: false
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
args: ["--strict"]
- repo: local
hooks:
- id: regenerate-parameters
name: regenerate-parameters
entry: python
args:
- ./.ci/parameter-generator.py
language: python
pass_filenames: false
- repo: https://github.com/numpy/numpydoc
rev: v1.11.0
hooks:
- id: numpydoc-validation
args: [--config=python-package]
- repo: https://github.com/jsh9/pydoclint
rev: 0.10.1
hooks:
- id: pydoclint
args: [--config=python-package/pyproject.toml]
- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.5
hooks:
- id: rstcheck
args: ["--config", "./python-package/pyproject.toml"]
additional_dependencies:
- breathe>=4.36.0
- sphinx>=8.1.3
- sphinx_rtd_theme>=3.0.1
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.20
hooks:
- id: ruff-check
args:
- "--fix"
- "--config=python-package/pyproject.toml"
# (isort) Import block is un-sorted or un-formatted
- "--fixable=I001"
types_or: [python, jupyter]
- id: ruff-format
args: ["--config", "python-package/pyproject.toml"]
types_or: [python, jupyter]
- repo: https://github.com/biomejs/pre-commit
rev: v2.5.2
hooks:
- id: biome-ci
args:
- --config-path=./biome.json
- --diagnostic-level=info
- --error-on-warnings
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
- repo: https://github.com/crate-ci/typos
rev: v1.48.0
hooks:
- id: typos
args: ["--force-exclude"]
exclude: (\.gitignore$)|(^\.editorconfig$)
- repo: https://github.com/henryiii/validate-pyproject-schema-store
rev: 2026.06.30
hooks:
- id: validate-pyproject
files: python-package/pyproject.toml$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v2.1.0
hooks:
- id: mypy
args: ["--config-file", "python-package/pyproject.toml", "python-package/"]
pass_filenames: false
verbose: true
additional_dependencies:
- matplotlib>=3.9.1
- narwhals>=2.26
- pandas>=2.0
- scikit-learn>=1.5.2
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.26.1
hooks:
- id: zizmor