-
Notifications
You must be signed in to change notification settings - Fork 4k
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
110 lines (109 loc) · 3.03 KB
/
.pre-commit-config.yaml
File metadata and controls
110 lines (109 loc) · 3.03 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
# exclude files which are auto-generated by build tools
exclude: |
(?x)^(
build|
external_libs|
lightgbm-python|
lightgbm_r|
)$
|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-toml
- id: check-xml
- id: end-of-file-fixer
- id: trailing-whitespace
- 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
- repo: https://github.com/adrienverge/yamllint
rev: v1.37.1
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/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.14.10
hooks:
- id: ruff-check
args: ["--config", "python-package/pyproject.toml"]
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.3.10
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.40.0
hooks:
- id: typos
args: ["--force-exclude"]
exclude: (\.gitignore$)|(^\.editorconfig$)
- repo: https://github.com/henryiii/validate-pyproject-schema-store
rev: 2025.11.21
hooks:
- id: validate-pyproject
files: python-package/pyproject.toml$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
hooks:
- id: mypy
args: ["--config-file", "python-package/pyproject.toml", "python-package/"]
pass_filenames: false
verbose: true
additional_dependencies:
- matplotlib>=3.9.1
- pandas>=2.0
- pyarrow>=17.0
- scikit-learn>=1.5.2