adds a pre-commit config
To use this run pre-commit install
in your module root.
Only files modified in the to-be-made commit are checked.
You can also run checks unconditionally like this pre-commit run -a yapf|clang-format
The clang-format one actually uses a binary wheel distribution of clang-format, which is really nice.
We should also check to upgrade to clang-format 13 when we have fewer branches ongoing. Maybe yapf 0.31 too.
Ping @ag-ohlberger/dune-community since I cannot request a review from a (sub-)group.