.pre-commit-config.yaml 1.36 KB
Newer Older
1
# exclude files which are auto-generated by build tools
2
3
4
5
6
7
8
exclude: |
  (?x)^(
      build|
      external_libs|
      lightgbm-python|
      lightgbm_r|
  )$
9
10
11
12
  |R-package/configure$
  |R-package/inst/Makevars$
  |R-package/inst/Makevars.win$
  |R-package/man/.*Rd$
13
14

repos:
15
  - repo: https://github.com/pre-commit/pre-commit-hooks
16
    rev: v5.0.0
17
18
19
    hooks:
      - id: end-of-file-fixer
      - id: trailing-whitespace
20
  - repo: https://github.com/adrienverge/yamllint
21
    rev: v1.37.1
22
23
24
    hooks:
      - id: yamllint
        args: ["--strict"]
25
26
  - repo: https://github.com/astral-sh/ruff-pre-commit
    # Ruff version.
27
    rev: v0.12.5
28
29
30
31
    hooks:
      # Run the linter.
      - id: ruff
        args: ["--config", "python-package/pyproject.toml"]
32
        types_or: [python, jupyter]
33
34
35
      # Run the formatter.
      - id: ruff-format
        args: ["--config", "python-package/pyproject.toml"]
36
        types_or: [python, jupyter]
37
38
39
  - repo: https://github.com/shellcheck-py/shellcheck-py
    rev: v0.10.0.1
    hooks:
40
41
      - id: shellcheck
  - repo: https://github.com/crate-ci/typos
42
    rev: v1.34.0
43
44
45
46
    hooks:
      - id: typos
        args: ["--force-exclude"]
        exclude: (\.gitignore$)|(^\.editorconfig$)
47
  - repo: https://github.com/henryiii/validate-pyproject-schema-store
48
    rev: 2025.07.14
49
50
51
    hooks:
      - id: validate-pyproject
        files: python-package/pyproject.toml$