-
-
Notifications
You must be signed in to change notification settings - Fork 739
[check-merge-conflict] False positive on RST files that use '=======' for header notation. #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From the docs on http://pre-commit.com you can exclude files with the Either that or you can use one more or one fewer |
These workarounds aren't suitable for the needs of cheroot as reported in cherrypy/cheroot#223. We would like to be able to detect merge conflicts in this file just like with any other file. I think the problem is that the check is over-matching. It's detecting content that's not a merge conflict. Git doesn't have this problem when invoking mergetool. Perhaps the hook could be more precise. |
mergetool can probably detect when all three markers are there -- but this hook is intended to also prevent the cases where one or more of the markers have been deleted which makes this much trickier (and much more prone to false positives) I'm not sure what the right answer is here |
Just ran into this on two RST files with 7-character underlines:
Perhaps the simplest thing is to ignore
|
Does |
It's better than nothing, but that would mean 145 RST files are never checked at all, which I think is worse than skipping one check in those files. Perhaps it could be an option for those who happen to run into this? |
Another workaround would be to change the ReSTructured text files to use one of the other available characters to mark section headings, for example |
This works around the overly enthusiastic pre-commit check for merhe conflicts as described in <pre-commit/pre-commit-hooks#100>.
Either ignore that conflict pattern in .rst files or are a option to ignore certain file patterns (I don't want to list all the other file options).
The text was updated successfully, but these errors were encountered: