Conversation
- pre-commit basic config: remove trailing white spaces, ... - typos: try to fix spell check errors typos there might report false-positive (e.g. a variable name). To exclude rightful names to be reported, just put them in `_typos.toml`, in section `default.extend-identifiers`.
tim-griesbach
left a comment
There was a problem hiding this comment.
Thanks for the PR! This looks good to me! The whitespace checking is a useful addition. I think it makes sense to unify the spellchecking since we have the script scspell calling codespell as well using doc/codespell_ignore.txt. One option would be to use codespell in the file .pre-commit-config.yaml instead of typos.
What do you think @cburstedde?
|
Hi @tim-griesbach |
|
Thanks for the contribution and discussion, I think we can keep various tools around. |
|
Comparing with the analogous PR in p4est, would it be possible to shorten the exclude list in this PR? |
Add pre-commit hooks config and fix reported typos
This PR adds configuration files for using
pre-commit, e.g.It can be run in command line terminal with
pre-commit run --all-files(pre-commitis available either as a system package in Debian/Ubuntu or from a python package manager) . It could in principle be placed in a CI script, but it sometimes detects false positives (e.g. abbreviated variable names), so it is better to have a human eyes to cross-check.False positives can be listed in
_typos.tomlso that they are ignored by the spell checker.