crate-ci / typos

Source code spell checker
Apache License 2.0
2.67k stars 109 forks source link

[wishlist] Please add a type for `COMMIT_EDITMSG` files #1117

Open zaufi opened 1 month ago

zaufi commented 1 month ago

I use typos also to check Git commit messages. Git automatically adds what's changed in the commit message file as git diff output and it may contain typos I want to exclude from checks. For example, index <git-hash-1>..<git-hash-2> <filemode> may cause errors like this:

error: `ba` should be `by`, `be`
  --> /path/to/my/repo/.git/COMMIT_EDITMSG:61:9
   |
61 | index a0ba5a281..ab42b8917 100644
   |         ^^
   |

It'll be nice to be able to add extend-ignore-re regexes for this type of file.

epage commented 1 month ago

In addition to COMMIT_EDITMSG, know of any other "well known" files that git deals with?

Ah, found what neovim does: https://github.com/neovim/neovim/blob/8ef3dd3afa20024f439d8b7a69f316069c1909d3/runtime/lua/vim/filetype.lua#L1532-L1536

Hmm, in general it might be good to review that. I don't know if we'd want to add all of their file types but would be good to at least add any file names we are missing for our file types.