Skip to content

Commit ecb8871

Browse files
authored
Merge pull request #111 from bgilbert/prek
pre-commit: switch to prek
2 parents b82b8f7 + 80fa779 commit ecb8871

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/java.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ jobs:
2222
with:
2323
python-version: 3.14
2424
- name: Install dependencies
25-
run: python -m pip install pre-commit
25+
run: python -m pip install prek uv
2626
- name: Cache pre-commit environments
2727
uses: actions/cache@v5
2828
with:
29-
path: ~/.cache/pre-commit
30-
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
29+
path: ~/.cache/prek
30+
key: prek|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
3131
- name: Run pre-commit hooks
32-
run: pre-commit run -a --show-diff-on-failure --color=always
32+
run: prek run -a --show-diff-on-failure --color=always
3333

3434
build:
3535
name: Build

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# priorities:
2+
# 0 - read-only
3+
# 1000 - mutually non-conflicting fixers
4+
# none - other fixers
5+
16
# exclude vendored files
27
exclude: '^(COPYING\.LESSER)$'
38

@@ -6,9 +11,13 @@ repos:
611
rev: v6.0.0
712
hooks:
813
- id: check-added-large-files
14+
priority: 0
915
- id: check-merge-conflict
16+
priority: 0
1017
- id: check-vcs-permalinks
18+
priority: 0
1119
- id: check-yaml
20+
priority: 0
1221
- id: end-of-file-fixer
1322
- id: fix-byte-order-marker
1423
- id: mixed-line-ending
@@ -19,18 +28,22 @@ repos:
1928
hooks:
2029
- id: codespell
2130
name: Check spelling with codespell
31+
priority: 0
2232
additional_dependencies:
2333
- tomli # Python < 3.11
2434

2535
- repo: meta
2636
hooks:
2737
- id: check-hooks-apply
38+
priority: 0
2839
- id: check-useless-excludes
40+
priority: 0
2941

3042
- repo: local
3143
hooks:
3244
- id: mkmaintainer
3345
name: Sync maintainer issue templates
46+
priority: 1000
3447
entry: .github/maintainer/mkmaintainer.py
3548
files: .github/maintainer/
3649
language: python

0 commit comments

Comments
 (0)