Repository navigation
ci: add prek commit hooks - #1578
Open
assignUser wants to merge 9 commits into
Open
assignUser wants to merge 9 commits into
assignUser wants to merge 9 commits into
Conversation
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
It runs over the whole repo, passing files just runs it multiple times. Signed-off-by: Jacob Wujciak-Jens <[email protected]>
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
remove superflous comments etc. Signed-off-by: Jacob Wujciak-Jens <[email protected]>
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
assignUser
force-pushed
the
ci/add-prek-hooks
branch
from
October 21, 2026 23:58
a4faa4b to
4f07005
Compare
assignUser
marked this pull request as ready for review
October 23, 2026 12:09
assignUser
requested review from
binarybana,
cryos,
elibol,
kkraus14,
nihalpasham,
roivanov and
rparolin
as code owners
October 23, 2026 12:10
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.
Summary
Closes #1571
This PR adds prek as a pre-commit framework. You can easily install prek from pypi via
uv tool install prekbut it's also available through nix, conda, brew etc..preks api is largely a drop in for pre-commit, so if you know how to run that you can re-use those commands but prek has the advantage of workspaces which make it easier to handle component specific checks, like in this repo.
I have moved the big check mentioned in
CONTRIBUTING.md:cargo oxide fmtwith separate, file gatedcargo fmtinvocations matching thefmt.ymlCI. If IUC this means the fmt part ofcargo-oxidecan be dropped as prek can cover the different workspaces with the right toolchain. So it should now run much faster and not block commits for 23 seconds for each commit.I have not yet replaced the existing CI jobs with the relevant prek commands (i.e. fmt etc.) but that is of course a big advantage, same command in CI as locally. There additional hooks we can run, e.g. linting of Actions Workflows, toml formatting etc.. But this should be a good baseline.
Checklist
git commit -s)