Repository navigation
ci: use pinned Ruff pre-commit hook in lint workflow - #15745
Open
matheusrodrigues2006 wants to merge 1 commit into
Open
matheusrodrigues2006 wants to merge 1 commit into
matheusrodrigues2006 wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Describe your change
Summary
The Ruff workflow previously used
uvx ruff check --output-format=github ., which resolves Ruff independently from theruff-pre-commitrevision in.pre-commit-config.yaml(currentlyv0.17.3). That can result in different Ruff versions in local checks and GitHub Actions.The workflow now runs:
This reuses the existing pinned hook without duplicating its version in the workflow. The change touches only
.github/workflows/ruff.ymland preserves the original triggers, checkout configuration and lint rules. It does not add Zizmor, which is already proposed in #15713, or claim to resolve every part of issue #15696.Verification
masterpush and pull-request triggers remained unchanged.actions/checkoutandastral-sh/setup-uvsteps remained unchanged.ruff-checkhook exists in.pre-commit-config.yamland uses pinnedruff-pre-commit@v0.17.3.pre-commitexecutable could not be run in the offline preparation environment; its package was not cached. The GitHub Actions run is therefore still required.Trade-off: This loses Ruff's direct GitHub annotations (
--output-format=github) and instead uses the normal pre-commit log output. If maintainers prefer the annotations, the version can alternatively be pinned explicitly to match the pre-commit hook, at the cost of keeping two pins synchronized.Checklist
Refs #15696