Add checks for whitespaces and executable scripts - #543
Draft
vxgmichel wants to merge 3 commits into
Draft
Conversation
Signed-off-by: Vincent Michel <vincent.michel@vates.tech>
Signed-off-by: Vincent Michel <vincent.michel@vates.tech>
Signed-off-by: Vincent Michel <vincent.michel@vates.tech>
vxgmichel
marked this pull request as ready for review
May 21, 2026 07:58
olivierh-pro
approved these changes
May 26, 2026
Millefeuille42
approved these changes
Jul 2, 2026
vxgmichel
marked this pull request as draft
July 2, 2026 15:25
Contributor
Author
|
Thanks @Millefeuille42 and @olivierh-pro for the review However, #562 made it clear that we need a non-modifying version of the hooks we use so that they can be integrated in the The problem is that the I'm not sure how to deal with this, I'll have to bring the subject to the team. I switched the PR to draft in the meantime. |
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.
This PR adds the following builtin prek hooks to the pre-commit configuration and the CI code checker job:
It also fixes a couple of trailing spaces and executable scripts issues that have been detected by those hooks.
Context
I ran all the builtin prek hooks on the repository to see if any of them was failing. This is the full list:
It turns out that 2 of them failed:
Since this is evidence that those issues do occur, I suggest to integrate those checks, along with two similar hooks:
Impact
Those hooks are fast (less than 100ms), and the extra CI job should not be costly either.