Closed LeonarddeR closed 3 weeks ago
Is this just for trailing white space? Will this diff cover it?
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5948e88c9..9c24d7333 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -8,6 +8,7 @@ repos:
- id: check-case-conflict
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
+ exclude: "user_docs/*/*.md"
- repo: https://github.com/asottile/add-trailing-comma
We might need to exclude the project docs as well, though i'd rather see that at least the English docs are on par with the trailing spaces rule, since trailing spaces in mark down are discarded anyway. It is likely that it is not only pre-commit conflicting with this rule, but also some ide that enforces removal of trailing whitepsace on remove, for example. I'm happy to provide a fixup pr for this if you prefer.
Yep feel free to propose some changes via a PR
Probably best to wait until #16808 is merged.
I think it's worth fixing sooner - I think we want a state where running pre-commit run --all-files
passes eventually
Disable pre-commit on merge. It seems almost impossible to perform a merge with conflicts without pre-commit kicking in
Workaround in the mean time from git bash SKIP=trailing-whitespace git merge --continue
I'll try to provide a pr later today that will also fix some small mistakes in the current config.
Closed by #16936
cc @seanbudd
Is your feature request related to a problem? Please describe.
With the current pre-commit config, commits including changes.md will perform a major rewrite of the file due to trailing whitespace
Describe the solution you'd like
Format the docs according to pre-commit expectations.
Describe alternatives you've considered