I am currently playing a bit with
clang-tidy for my teaching. At some point I stumbled on #1552 (closed) and I wrote this (very little) MR to let you know how easy it is to use it.
#> git clone https://github.com/barisione/clang-format-hooks.git #> mkdir .git/scripts/ #> cp clang-format-hooks/apply-format .git/scripts/ #> cp clang-format-hooks/git-pre-commit-format .git/scripts/ #> .git/scripts/git-pre-commit-format install #> rm -fr clang-format-hooks/
And, it works... Nothing more to add.
I am not sure this will be useful to anybody else, but it captures quite a lot of stupid errors I do a lot (forgetting space between function name and the left parenthesis, wrong indent, ...). So, it seems to be extremely useful (at least to me).
Related to issue #1552 (closed)