Add pre-commit and fix issues pointed out by formatters/linters
On some systems, PMT fails to build due to different compiler versions and OS versions than we used for testing. To make the code more robust, pre-commit
is added to automatically check the code for problems. There are currently three tools enabled:
- clang-format: checks/corrects formatting of C++ files
- cmake-format: checks/corrects formatting of CMake files
- include-what-you-use (iwyu): check for incorrect (superfluous/missing) includes and some other code problems (fixing must be done manually)
Additionally, a new file README.dev.md
(inspired by the same file in the cudawrappers repository) is added to describe the use of pre-commit
.