Open iamazeem opened 1 month ago
Will review and comment shortly
Is it possible to start with CI failing if changed code does not conform-- but only for changed code? If so, let's do that.
If not, can we start with having the CI fail if code does not conform, but only for certain specified files? If so, let's do that, starting with src/*.*
. We can broaden the scope later.
If none of the above is feasible, will review further and get back to you.
Both are feasible.
However, I'll recommend to create one single PR first with formatted source code in one go excluding externals libs. After that, it'll just be the conformance of the new code only.
Hi,
To automate the source code formatting and to keep it consistent throughout,
clang-format
can be configured forzsv
:https://zed0.co.uk/clang-format-configurator/ may be used to generate the
.clang-format
file. Once.clang-format
is added, the users can configure their editors, e.g. VS Code, to format source files automatically (on demand or on save).The same can be integrated in the CI pipeline as well to enforce a consistent style. The CI may fail if code is not formatted or it can reformat and commit the formatted files back to repo. LMK what would be the preferred workflow. I'll update the CI accordingly.
Thanks!