|
13 | 13 | # See https://github.com/pre-commit/pre-commit |
14 | 14 |
|
15 | 15 | repos: |
16 | | -# Standard hooks |
17 | | -- repo: https://github.com/pre-commit/pre-commit-hooks |
18 | | - rev: v6.0.0 |
19 | | - hooks: |
20 | | - - id: check-case-conflict |
21 | | - - id: check-docstring-first |
22 | | - - id: check-executables-have-shebangs |
23 | | - - id: check-merge-conflict |
24 | | - - id: check-symlinks |
25 | | - - id: check-yaml |
26 | | - args: ["--allow-multiple-documents"] |
27 | | - - id: debug-statements |
28 | | - files: src/pyhepmc/.*\\.py |
29 | | - - id: end-of-file-fixer |
30 | | - - id: mixed-line-ending |
31 | | - - id: sort-simple-yaml |
32 | | - - id: file-contents-sorter |
33 | | - - id: trailing-whitespace |
34 | | - exclude: ^doc/_static/.*.svg |
| 16 | + # Standard hooks |
| 17 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 18 | + rev: v6.0.0 |
| 19 | + hooks: |
| 20 | + - id: check-case-conflict |
| 21 | + - id: check-docstring-first |
| 22 | + - id: check-executables-have-shebangs |
| 23 | + - id: check-merge-conflict |
| 24 | + - id: check-symlinks |
| 25 | + - id: check-yaml |
| 26 | + args: ["--allow-multiple-documents"] |
| 27 | + - id: debug-statements |
| 28 | + files: src/pyhepmc/.*\\.py |
| 29 | + - id: end-of-file-fixer |
| 30 | + - id: mixed-line-ending |
| 31 | + - id: sort-simple-yaml |
| 32 | + - id: file-contents-sorter |
| 33 | + - id: trailing-whitespace |
| 34 | + exclude: ^doc/_static/.*.svg |
35 | 35 |
|
36 | | -# Python formatting |
37 | | -- repo: https://github.com/psf/black-pre-commit-mirror |
38 | | - rev: 25.9.0 |
39 | | - hooks: |
40 | | - - id: black |
| 36 | + # Ruff linter, replacement for flake8, pydocstyle, isort |
| 37 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 38 | + rev: "v0.14.1" |
| 39 | + hooks: |
| 40 | + - id: ruff |
| 41 | + args: [--fix, --show-fixes] |
| 42 | + - id: ruff-format |
41 | 43 |
|
42 | | -# Ruff linter, replacement for flake8, pydocstyle, isort |
43 | | -- repo: https://github.com/astral-sh/ruff-pre-commit |
44 | | - rev: 'v0.14.1' |
45 | | - hooks: |
46 | | - - id: ruff |
47 | | - args: [--fix, --show-fixes] |
| 44 | + # C++ formatting |
| 45 | + - repo: https://github.com/pre-commit/mirrors-clang-format |
| 46 | + rev: v21.1.2 |
| 47 | + hooks: |
| 48 | + - id: clang-format |
48 | 49 |
|
49 | | -# C++ formatting |
50 | | -- repo: https://github.com/pre-commit/mirrors-clang-format |
51 | | - rev: v21.1.2 |
52 | | - hooks: |
53 | | - - id: clang-format |
| 50 | + # CMake formatting |
| 51 | + - repo: https://github.com/cheshirekow/cmake-format-precommit |
| 52 | + rev: v0.6.13 |
| 53 | + hooks: |
| 54 | + - id: cmake-format |
| 55 | + additional_dependencies: [pyyaml] |
| 56 | + types: [file] |
| 57 | + files: (\.cmake|CMakeLists.txt)(.in)?$ |
54 | 58 |
|
55 | | -# CMake formatting |
56 | | -- repo: https://github.com/cheshirekow/cmake-format-precommit |
57 | | - rev: v0.6.13 |
58 | | - hooks: |
59 | | - - id: cmake-format |
60 | | - additional_dependencies: [pyyaml] |
61 | | - types: [file] |
62 | | - files: (\.cmake|CMakeLists.txt)(.in)?$ |
| 59 | + # Python type checking |
| 60 | + - repo: https://github.com/pre-commit/mirrors-mypy |
| 61 | + rev: "v1.18.2" |
| 62 | + hooks: |
| 63 | + - id: mypy |
| 64 | + # additional_dependencies: [numpy] |
| 65 | + args: [src] |
| 66 | + pass_filenames: false |
63 | 67 |
|
64 | | -# Python type checking |
65 | | -- repo: https://github.com/pre-commit/mirrors-mypy |
66 | | - rev: 'v1.18.2' |
67 | | - hooks: |
68 | | - - id: mypy |
69 | | - # additional_dependencies: [numpy] |
70 | | - args: [src] |
71 | | - pass_filenames: false |
| 68 | + - repo: https://github.com/henryiii/validate-pyproject-schema-store |
| 69 | + rev: 2025.10.11 |
| 70 | + hooks: |
| 71 | + - id: validate-pyproject |
0 commit comments