Skip to content

clang-format: add more rules and enable on CI

The series was mostly inspired by a patch sent recently to 'include kh_foreach* macros in ForEachMacros' 1. I was wondering why we don't run the formatting on CI and reduce some of the workload of reviewers.

We have '.clang-format' file to provide rules for code formatting. The commits 1-6 aims to add more rules to the files while deprecating old ones.

Commit 7 enables CI action on GitHub and GitLab to also check for the code formatting. Currently, it is allowed to fail. This way we can build confidence and fine tune the values as needed and finally enforce the check in a future patch.

Commit 8 fixes an existing issue with the 'check-whitespace' job, which is failing successfully in the GitLab CI.

I'm not well versed with GitHub workflows, and I mostly tried to copy existing work there. Expecting some feedback in that section!

Edited by Karthik Nayak

Merge request reports

Loading