forked from dmlc/xgboost
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
64 lines (64 loc) · 1.89 KB
/
.pre-commit-config.yaml
File metadata and controls
64 lines (64 loc) · 1.89 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
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-merge-conflict
- id: check-case-conflict
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: mixed-line-ending
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
hooks:
- id: ruff-check
args:
- --fix
- --select=I
files: \.py$
exclude: (dmlc-core|gputreeshap)
- id: ruff-format
files: \.py$
exclude: (dmlc-core|gputreeshap)
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v21.1.8
hooks:
- id: clang-format
args: [--style=file]
files: \.(cc|c|cpp|h|cu|hpp)$
exclude: (dmlc-core|gputreeshap)
- repo: local
hooks:
- id: lint-cpp
name: C++ lint (cpplint)
entry: python ops/script/lint_cpp.py
language: python
types: [file]
files: \.(cc|c|cpp|h|cu|hpp)$
exclude: (dmlc-core|gputreeshap)
additional_dependencies:
- cpplint==1.6.1
- id: lint-cmake
name: CMake lint (cmakelint)
entry: cmakelint --linelength=120 --filter=-convention/filename,-package/stdargs,-readability/wonkycase
language: python
types: [file]
files: (CMakeLists\.txt$|^cmake/.*\.cmake$)
exclude: (dmlc-core|gputreeshap)
additional_dependencies:
- cmakelint
- id: pylint
name: Python lint (pylint)
entry: pylint
language: python
types: [file]
files: \.py$
exclude: (dmlc-core|gputreeshap|^ops/|^tests/)
args:
- --rcfile=python-package/pyproject.toml
additional_dependencies:
- pylint