Migrate linting CI from pre-commit to prek#151
Merged
Conversation
Use the prek-action (a faster, drop-in reimplementation of pre-commit) in both the lint check and the @nf-core-bot autofix workflow. prek reads the existing .pre-commit-config.yaml and runs the same hooks, so the config is kept unchanged and contributors can still run pre-commit locally. - pre-commit.yml: replace setup-python + pip install pre-commit with j178/prek-action (runs prek run --all-files). - fix-linting.yml: install prek via the action (install-only) and run it, preserving the continue-on-error outcome that drives the commit/react logic. - Keep the 'pre-commit' job name so required-status-check protection is unaffected. Addresses #150 (CI swap, keeping .pre-commit-config.yaml).
mashehu
approved these changes
Jun 17, 2026
Comment on lines
40
to
43
| - name: Run prek | ||
| id: prek | ||
| run: prek run --all-files | ||
| continue-on-error: true |
Contributor
There was a problem hiding this comment.
not needed if we run the setup step without the added install-only
Contributor
Author
There was a problem hiding this comment.
Good call — done in 9f456e2. Dropped install-only and the separate run step; the action now runs prek run --all-files directly with id: prek + continue-on-error, so the existing steps.prek.outcome autofix/commit logic is unchanged.
Generated by Claude Code
Address review feedback: drop the install-only + separate run step and let j178/prek-action run prek run --all-files itself, with id + continue-on-error driving the existing autofix/commit logic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate the linting CI from
pre-committoprek— a faster, single-binary, drop-in reimplementation of pre-commit written in Rust.prekreads the existing.pre-commit-config.yamland runs the same hooks, so the config is kept unchanged and contributors can still usepre-commitlocally if they prefer. Noprek.toml, no forced tooling change.Changes
.github/workflows/pre-commit.yml— replaceactions/setup-python+pip install pre-commit+pre-commit run --all-fileswithj178/prek-action(which runsprek run --all-files)..github/workflows/fix-linting.yml(the@nf-core-bot fix lintingautofix) — install prek via the action (install-only: true) and runprek run --all-files, preserving thecontinue-on-erroroutcome that drives the commit/react logic.pre-commitjob name so any required-status-check branch protection keeps matching.prek-actionis pinned to a commit SHA (v2.0.4) to match the repo's other pinned actions.Why
.pre-commit-config.yaml, same hooks (prettier, editorconfig-checker, actionlint).Notes
https://claude.ai/code/session_01DGsyWUGbsvfkJDgdcaYLxv
Generated by Claude Code