We should have clang-format in CI
As per the title. It's currently only applied by Ben - I didn't actually know we were supposed to do that until recently!
+1 We could also add black for the Python files and cmake-format at the same time?
If you're a VSCode user, there are extensions for clang-format, cmake-format and black that can be set up to format on save.
One other consideration is how to preserve the git blame history when you bulk re-format all the source files. Adding a .git-blame-ignore-revs containing the format commit hash(es) is probably about as good as you can do, I think.
We have this in BOUT++: https://github.com/boutproject/BOUT-dev/blob/master/.github/workflows/clang-format.yml
There is a small downside: running this in PRs can hide test failures, which is a bit annoying. The other options are to run it as a test, failures require the user to run clang-format etc manually; or to run it automatically, but only on main.