|
18 | 18 | types: [shell] |
19 | 19 | args: ["-x"] |
20 | 20 |
|
| 21 | +- id: trailing-whitespace |
| 22 | + name: trailing-whitespace |
| 23 | + description: Trim trailing whitespace and stage fixed files. |
| 24 | + entry: python -m kreuzberg_hooks._autofix -- trailing-whitespace-fixer |
| 25 | + language: python |
| 26 | + types: [text] |
| 27 | + additional_dependencies: ["pre-commit-hooks==6.0.0"] |
| 28 | + |
| 29 | +- id: end-of-file-fixer |
| 30 | + name: end-of-file-fixer |
| 31 | + description: Ensure files end with one newline and stage fixed files. |
| 32 | + entry: python -m kreuzberg_hooks._autofix -- end-of-file-fixer |
| 33 | + language: python |
| 34 | + types: [text] |
| 35 | + additional_dependencies: ["pre-commit-hooks==6.0.0"] |
| 36 | + |
| 37 | +- id: check-merge-conflict |
| 38 | + name: check-merge-conflict |
| 39 | + description: Check for merge conflict markers. |
| 40 | + entry: check-merge-conflict |
| 41 | + language: python |
| 42 | + types: [text] |
| 43 | + additional_dependencies: ["pre-commit-hooks==6.0.0"] |
| 44 | + |
| 45 | +- id: check-added-large-files |
| 46 | + name: check-added-large-files |
| 47 | + description: Prevent accidentally committing large files. |
| 48 | + entry: check-added-large-files |
| 49 | + language: python |
| 50 | + additional_dependencies: ["pre-commit-hooks==6.0.0"] |
| 51 | + |
| 52 | +- id: detect-private-key |
| 53 | + name: detect-private-key |
| 54 | + description: Detect private keys before commit. |
| 55 | + entry: detect-private-key |
| 56 | + language: python |
| 57 | + types: [text] |
| 58 | + additional_dependencies: ["pre-commit-hooks==6.0.0"] |
| 59 | + |
| 60 | +- id: check-json |
| 61 | + name: check-json |
| 62 | + description: Validate JSON syntax. |
| 63 | + entry: check-json |
| 64 | + language: python |
| 65 | + types: [json] |
| 66 | + additional_dependencies: ["pre-commit-hooks==6.0.0"] |
| 67 | + |
| 68 | +- id: check-yaml |
| 69 | + name: check-yaml |
| 70 | + description: Validate YAML syntax. |
| 71 | + entry: check-yaml |
| 72 | + language: python |
| 73 | + types: [yaml] |
| 74 | + additional_dependencies: ["pre-commit-hooks==6.0.0"] |
| 75 | + |
| 76 | +- id: check-toml |
| 77 | + name: check-toml |
| 78 | + description: Validate TOML syntax. |
| 79 | + entry: check-toml |
| 80 | + language: python |
| 81 | + types: [toml] |
| 82 | + additional_dependencies: ["pre-commit-hooks==6.0.0"] |
| 83 | + |
| 84 | +- id: check-case-conflict |
| 85 | + name: check-case-conflict |
| 86 | + description: Check for files that conflict on case-insensitive filesystems. |
| 87 | + entry: check-case-conflict |
| 88 | + language: python |
| 89 | + additional_dependencies: ["pre-commit-hooks==6.0.0"] |
| 90 | + |
| 91 | +- id: check-executables-have-shebangs |
| 92 | + name: check-executables-have-shebangs |
| 93 | + description: Check executable files have shebangs. |
| 94 | + entry: check-executables-have-shebangs |
| 95 | + language: python |
| 96 | + types: [text, executable] |
| 97 | + additional_dependencies: ["pre-commit-hooks==6.0.0"] |
| 98 | + |
| 99 | +- id: check-shebang-scripts-are-executable |
| 100 | + name: check-shebang-scripts-are-executable |
| 101 | + description: Check shebang scripts are executable. |
| 102 | + entry: check-shebang-scripts-are-executable |
| 103 | + language: python |
| 104 | + types: [text] |
| 105 | + additional_dependencies: ["pre-commit-hooks==6.0.0"] |
| 106 | + |
| 107 | +- id: mixed-line-ending |
| 108 | + name: mixed-line-ending |
| 109 | + description: Normalize mixed line endings and stage fixed files. |
| 110 | + entry: python -m kreuzberg_hooks._autofix -- mixed-line-ending |
| 111 | + language: python |
| 112 | + types: [text] |
| 113 | + args: ["--fix=lf"] |
| 114 | + additional_dependencies: ["pre-commit-hooks==6.0.0"] |
| 115 | + |
| 116 | +- id: pyproject-fmt |
| 117 | + name: pyproject-fmt |
| 118 | + description: Format pyproject.toml and stage fixed files. |
| 119 | + entry: python -m kreuzberg_hooks._autofix -- pyproject-fmt |
| 120 | + language: python |
| 121 | + files: (^|/)pyproject\.toml$ |
| 122 | + additional_dependencies: ["pyproject-fmt==2.21.2"] |
| 123 | + |
| 124 | +- id: ruff |
| 125 | + name: ruff |
| 126 | + description: Lint and autofix Python files with Ruff, staging fixed files. |
| 127 | + entry: python -m kreuzberg_hooks._autofix -- ruff check --fix |
| 128 | + language: python |
| 129 | + types_or: [python, pyi] |
| 130 | + additional_dependencies: ["ruff==0.15.14"] |
| 131 | + |
| 132 | +- id: ruff-format |
| 133 | + name: ruff-format |
| 134 | + description: Format Python files with Ruff, staging fixed files. |
| 135 | + entry: python -m kreuzberg_hooks._autofix -- ruff format |
| 136 | + language: python |
| 137 | + types_or: [python, pyi] |
| 138 | + additional_dependencies: ["ruff==0.15.14"] |
| 139 | + |
| 140 | +- id: actionlint |
| 141 | + name: actionlint |
| 142 | + description: Lint GitHub Actions workflow files. |
| 143 | + entry: hooks/actionlint/run.sh |
| 144 | + language: script |
| 145 | + files: ^\.github/workflows/.*\.ya?ml$ |
| 146 | + |
| 147 | +- id: gh-actions-updater |
| 148 | + name: gh-actions-updater |
| 149 | + description: Update GitHub Actions versions and stage changed workflows. |
| 150 | + entry: python -m kreuzberg_hooks._autofix --stage-all -- gh-actions-updater --update . |
| 151 | + language: python |
| 152 | + pass_filenames: false |
| 153 | + files: ^\.github/workflows/.*\.ya?ml$ |
| 154 | + additional_dependencies: ["gh-actions-updater==0.1.5"] |
| 155 | + |
| 156 | +- id: typos |
| 157 | + name: typos |
| 158 | + description: Fix source typos and stage changed files. |
| 159 | + entry: hooks/typos/run.sh |
| 160 | + language: script |
| 161 | + types: [text] |
| 162 | + args: ["--force-exclude"] |
| 163 | + |
| 164 | +- id: ai-rulez-generate |
| 165 | + name: ai-rulez generate |
| 166 | + description: Regenerate AI governance files and stage changed outputs. |
| 167 | + entry: hooks/ai-rulez/run.sh generate |
| 168 | + language: script |
| 169 | + pass_filenames: false |
| 170 | + always_run: true |
| 171 | + |
| 172 | +- id: ai-rulez-validate |
| 173 | + name: ai-rulez validate |
| 174 | + description: Validate AI governance files. |
| 175 | + entry: hooks/ai-rulez/run.sh validate |
| 176 | + language: script |
| 177 | + pass_filenames: false |
| 178 | + always_run: true |
| 179 | + |
| 180 | +- id: alef-verify |
| 181 | + name: alef verify |
| 182 | + description: Verify Alef-generated files are fresh. |
| 183 | + entry: hooks/alef/run.sh verify |
| 184 | + language: script |
| 185 | + pass_filenames: false |
| 186 | + files: alef\.toml$ |
| 187 | + |
| 188 | +- id: alef-sync-versions |
| 189 | + name: alef sync-versions |
| 190 | + description: Sync Alef binding versions and stage changed files. |
| 191 | + entry: hooks/alef/run.sh sync-versions |
| 192 | + language: script |
| 193 | + pass_filenames: false |
| 194 | + files: alef\.toml$ |
| 195 | + |
21 | 196 | - id: cargo-fmt |
22 | 197 | name: cargo fmt |
23 | 198 | description: Format Rust workspaces using the consumer repo's Rust toolchain. |
|
429 | 604 | - id: clang-format |
430 | 605 | name: clang-format (C/C++ formatter) |
431 | 606 | description: Format C/C++ source files using clang-format from a pinned PyPI wrapper. |
432 | | - entry: clang-format |
| 607 | + entry: python -m kreuzberg_hooks._autofix -- clang-format |
433 | 608 | language: python |
434 | 609 | types_or: [c, c++] |
435 | 610 | args: ["-i"] |
|
457 | 632 | - id: rumdl-fmt |
458 | 633 | name: rumdl fmt (Markdown formatter) |
459 | 634 | description: Format Markdown files in place with rumdl. |
460 | | - entry: rumdl fmt |
| 635 | + entry: python -m kreuzberg_hooks._autofix -- rumdl fmt |
461 | 636 | language: python |
462 | 637 | types: [markdown] |
463 | 638 | require_serial: true |
|
598 | 773 | # textlint v15 requires either a .textlintrc or explicit --rule flags. We pass |
599 | 774 | # --rule for each package in additional_dependencies so consumers don't need a |
600 | 775 | # local .textlintrc just to use this hook. |
601 | | - entry: textlint |
| 776 | + entry: python -m kreuzberg_hooks._autofix -- textlint |
602 | 777 | language: node |
603 | 778 | types: [markdown] |
604 | 779 | files: ^docs/.*\.md$ |
|
0 commit comments