-
Notifications
You must be signed in to change notification settings - Fork 124
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
[Q] Can't match git diff
output
#1118
Comments
I put that config in a directory with that block of text in a file and typos succeeded. To test my setup, I removed the config and it failed. The only thin I can think of is that typos isn't finding the config. If you could run We determine where to load the config based on the file or directory path passed to typos/crates/typos-cli/src/bin/typos-cli/main.rs Lines 192 to 221 in 6802cc6
|
I'm using
I intentionally changed |
I also tried another solution: to change my Git message template to add smth like Please advise 🙏🙏🙏 |
Can you test your config outside of a pre-commit setup to make sure it is working? |
Yes, it works %-) $ cat COMMIT_MESSAGE
Test `typos` config
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
diff --git a/tests/010-simple-secret.sh b/tests/010-simple-secret.sh
index 7f5ba185f..0ebe349ef 100644
some other text
$ cat .typos.toml
[default]
extend-ignore-re = [
"(?Rm)^index [0-9a-f]{9}\\.\\.[0-9a-f]{9} [0-9]+$"
]
$ typos COMMIT_MESSAGE
$ |
Is there a meaningful difference in the verbose output? |
Nope... just the same bunch of |
Sorry! I've got it! %) However, I still need advice on how to ignore text since a marker text (e.g. "# Please enter the commit message for your changes.") up to the end of a file. |
Could you specify your custom commit message template and say which sections you want checked? Also, at the bottom of https://github.com/crate-ci/typos/blob/master/docs/reference.md#example-configurations we have example regexes you may want to look at. |
I want to exclude some lines from Git commit message files (see #1117) and have this in my
.typos.toml
for now:However, the
COMMIT_EDITMSG
like this does not match and causes an error:result in the error:
It doesn't match even if I reduce regex to the trivial as
^index .*$
!Please help…
The text was updated successfully, but these errors were encountered: