Whitespace precommit - #3894
Conversation
lcaouen
left a comment
There was a problem hiding this comment.
Hard to review all the files but as it's only removing extra white space, there is no risk to approve it.
|
Oh wow...This is a lot I think that we can configure this check such that we apply it only when we are going to be committing changes to a file. This way we don't have a 1k file changeset and the git history shows everything was last modified by this one commit. We had followed similar rule with other repos were we applied a new linter... we would only apply it to the files that were part of a new PR I thought that the above workflow was the default pre-commit behaviour... |
Applying this whitespace change to the complete code base risks creating merge conflicts in pending PRs. |
|
can we break this up
|
e4fb7bc to
52b1032
Compare
|
Well, I generally disagree with all points:
That's why diffing that ignores whitespace exists. Can also run
It's only whitespace?
That is usually what happens when changing a formatting paradigm, I think it is fine myself.
Oh? Where? I did it in the archiver but not seen that pattern anywhere else. I regret doing it in the archiver and wish I just formatted everything anyway, it caused more problems this way.
I don't think so. I think the pre-commit is fix everything as early as possible. (Which I do agree can be annoying).
Yes, to me that is a good thing. Getting everyone to rebase regularly is IMHO a good practice.
I can have a go. |
|
can we skip the --all-files part |
|
I was going to suggest to use this https://pre-commit.com/#pre-commit-run
|
7399d4f to
39110d1
Compare
use start and end checks
39110d1 to
3896727
Compare
|
Thank you... I hope this PR wasn't too painful The to and from is backed by the official pre-commit tool so I think we are on firm grounds here :) |
|
|
Also good job on figuring out the how to do it for |



Checklist
Testing:
Documentation: