Skip to content

"Make code google style compliant and add code formatting check to CI/CD"

Jakob Maljaars requested to merge 5-google-cppstyle into master

A work-in-progress (WIP) merge request which shows how we can automatically reformat code to make it compliant with google-style.

The formatter can be invoked in various ways

  • Run the script ./scripts/run-clang-format.sh
  • Run something like find . -path ./external -prune -o -name '*.h' -prune -o -name '*.cc' -exec clang-format -i -style=file \{\} + from your terminal.
  • Recommended: add ./scripts/clang-format-check.sh to the pre-commit hooks by simply adding ./scripts/clang-format-check.sh to .git/hooks/pre-commit

@offringa @tol WIP will be resolved once:

  • your approval of this working modus
  • and (of course) once we reformatted the code and pass the clang-format stage

@dijkema: you might find this interesting 😉

Closes #5 (closed)

Edited by Jakob Maljaars

Merge request reports