diff --git a/.github/workflows/java.yaml b/.github/workflows/java.yaml index 5380032..ec69d92 100644 --- a/.github/workflows/java.yaml +++ b/.github/workflows/java.yaml @@ -22,14 +22,14 @@ jobs: with: python-version: 3.14 - name: Install dependencies - run: python -m pip install pre-commit + run: python -m pip install prek uv - name: Cache pre-commit environments uses: actions/cache@v5 with: - path: ~/.cache/pre-commit - key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} + path: ~/.cache/prek + key: prek|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} - name: Run pre-commit hooks - run: pre-commit run -a --show-diff-on-failure --color=always + run: prek run -a --show-diff-on-failure --color=always build: name: Build diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c1306ce..6784354 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,8 @@ +# priorities: +# 0 - read-only +# 1000 - mutually non-conflicting fixers +# none - other fixers + # exclude vendored files exclude: '^(COPYING\.LESSER)$' @@ -6,9 +11,13 @@ repos: rev: v6.0.0 hooks: - id: check-added-large-files + priority: 0 - id: check-merge-conflict + priority: 0 - id: check-vcs-permalinks + priority: 0 - id: check-yaml + priority: 0 - id: end-of-file-fixer - id: fix-byte-order-marker - id: mixed-line-ending @@ -19,18 +28,22 @@ repos: hooks: - id: codespell name: Check spelling with codespell + priority: 0 additional_dependencies: - tomli # Python < 3.11 - repo: meta hooks: - id: check-hooks-apply + priority: 0 - id: check-useless-excludes + priority: 0 - repo: local hooks: - id: mkmaintainer name: Sync maintainer issue templates + priority: 1000 entry: .github/maintainer/mkmaintainer.py files: .github/maintainer/ language: python