Clang Tools Setup


I set up our clang-format settings file, wrote a bash script to run it on all our C++ files, and made a GitHub Action to check if a commit is properly formatted that will run on every push and PR. I also added a .git-blame-rev-ignore-revs file to help git blame know to ignore the reformatting commits.


I set up the .clang-tidy file with all the settings we want and hooked it into Cholla’s build system so it will work with all our code, including the GPU code. I figured out which checks we want to run and then disabled all the ones that aren’t currently passing, over time we’ll work on getting them to pass. You can find my clang-tidy notes here. Next week I’ll add clang to our docker images and add a GitHub Actions workflow to run clang-tidy.

This post is licensed under CC BY 4.0 by the author.