Code-formatting rules using clang-format-11 and gofmt tools applied to Certifier Framework code base. #185
gapisback
announced in
Announcements
Replies: 1 comment 2 replies
-
Nice description! One suggestion. How about adding a formatting tool for shell programs? For example, ISLET is using |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, team --
A few days ago, under commit @sha c1f59c6, a collection of clang-formatting rules have been applied to the source code and integrated to
/main
.PR is: #172
Relevant dev workflow documents will be updated shortly, but in the interim, here are the things you should be aware of while doing code development in this repo:
We have tried to stay close[r] to the existing code base, which is based on Google’s C++ coding style. We have incorporated a set of rules in a .clang-format file that will now live at the root of the Certifier repo.
This new source formatting requirement is checked by a new script, CI/scripts/check-srcfmt.sh
We have standardized on
clang-format-11
version of the toolAny source-code formatting errors will be caught by this script and your CI build-job will fail in very early stage. So, it’s better if you check your formatting before pushing to GitHub to trigger CI builds.
In your active dev branches, you can run this to fix all formatting errors :
$ CI/scripts/check-srcfmt.sh fixall
The code-formatting for a small collection of Go code in the repository is verified by use of the
gofmt
tool, and implemented in CI by the CI/scripts/check-gofmt.sh script. This change was implemented under PR (#120) Apply default 'gofmt' formatting for all .go files in repo. #125 .All developers are requested to be aware of these code-formatting rules and to apply the relevant scripts / tools prior to submitting code for PR-reviews.
Thanks, in advance.
Beta Was this translation helpful? Give feedback.
All reactions