Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The configuration file that details specifics for Clang-Format are in .clang-format in the root directory of the repository. It was generated using clang-format -style=google -dump-config > .clang-format and aforementioned changes were made. When clang-format is run, it looks for this file in the current working directory.

Usage (TL;DR)

  1. Make sure you have the latest version of
  2. Run make check to see if your code passes the linting/formatting checks. It will tell you what step it fails on.
  3. If it fails the formatting step (which is clang-format), run make format to apply formatting changes. This will move things around to make your code prettier. Go back to step 1 and run make check again.
  4. If it fails the linting step (which is clang-tidy), read the error(s) it's spitting out and try to fix them. These may be more varied since linting is static analysis for bugs, naming checks, and more. Go back to step 1 and run make check again.
  5. Once make check passes, run make leader (or equivalent to build code for the desired target) and ensure that there are no compilation errors. Since make format and make tidy change your code pretty heavily, there is a good chance that they make your code fail compilation. Fix the errors and do steps 1-5 again.