Introduce Clang format and signed-off trailers check as part of CI

Manually reviewing all the parts of the formatting changes is time consuming so adding CI stage to do this for us should help.

The formatting rules might need some love as it still completely does not follow our guides when applied to whole source tree, but it should be good enough to be applied on new code to keep our code standards:

The following applies the formatting changes to whole codebase, identifying many minor issues, but reformatting also a lot of structure initializers:

find . -type d -name .git -prune , -type f -name \*.[hc] -exec clang-format --verbose -i {} \; -print

This can be also manually tested on your new code:

git-clang-format --diff upstream/master

The sign-off trailers check is based on the work done by @cryptomilk in !104 (closed).

Checklist

  • Commits have Signed-off-by: with name/author being identical to the commit author
  • Code modified for feature
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated

Reviewer's checklist:

  • Any issues marked for closing are addressed
  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTING.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code
Edited by Jakub Jelen

Merge request reports

Loading