Added Linter (clang-format) CI

Added a job in the Gitlab CI to run the diff through git-clang-format and fail when it detects formatting issues.

Closes: https://gitlab.com/bloomberg/recc/issues/3

Related MR: https://gitlab.com/bloomberg/recc/merge_requests/11 (optional pre-commit hook to test for and fix formatting issues)

Examples:

NOTE:

Decided that running just the diff is instead of the whole project because:

  • CI will be faster
  • We might - for some reason - need to force specific code that doesn't adhere to the formatting style, this shouldn't cause CIs to fail in any subsequent commits, it should just fail in the commit/MR that introduced the formatting issue.

Merge request reports

Loading