pre-commit: ignore all text after scissor line in COMMIT_EDITMSG
If `git` is configured to open an editor on commit (to edit a commit message), it adds a `git diff` below the scissor line. Tell `typos` to ignore everything below it.
This commit is contained in:
parent
e188d8d6dc
commit
d6aeb98869
@ -9,6 +9,9 @@ extend-ignore-re = [
|
||||
"(?s)(#|/(/|\\*)|\\.\\.)\\s*(NOQA|noqa):? spellcheck(: *|=| +)off.*?\\n\\s*(#|/(/|\\*)|\\.\\.)\\s*(NOQA|noqa):? spellcheck(: *|=| +)on"
|
||||
# NOTE Allow to mark a line to exclude from spellchecking
|
||||
, "(?Rm)^.*(#|/(/|\\*)|\\.\\.)\\s*(NOQA|noqa):? spellcheck(: *|=| +)disable-line$"
|
||||
# NOTE Stop checking from this line to the end of file
|
||||
# This line is a marker added by Git to the `COMMIT_EDITMSG`.
|
||||
, "(?sm)^# ------------------------ >8 ------------------------$.*"
|
||||
]
|
||||
locale = "en-us"
|
||||
# ATTENTION If, for any reason, you want to add the
|
||||
|
Loading…
Reference in New Issue
Block a user