-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clang formatter and a workflow for checking #1530
base: master
Are you sure you want to change the base?
Conversation
All source codes are now formatted. `clang-format.sh` is now introduced and should be run for new commits. The `.clang-format` file is updated. It is now corresponding to a style like the status quo. The `.clang-format-ignore` file is created for future uses.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1530 +/- ##
==========================================
- Coverage 66.68% 62.78% -3.90%
==========================================
Files 244 244
Lines 25930 24912 -1018
Branches 4557 4697 +140
==========================================
- Hits 17292 15642 -1650
- Misses 8638 9270 +632
|
@@ -0,0 +1 @@ | |||
git ls-tree --full-tree --name-only -r HEAD | grep -e ".*\.\(c\|h\|hpp\|cc\|cpp\|hh\)\$" | grep -vf .clang-format-ignore | xargs clang-format -i -style=file --verbose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this line to svf-lib.publish.yml and remove this file
Don not commit the formatted cpp/h files and they will be automatically done after CI. |
Just wondering what is the point of formatting after CI instead of formatting the original codes. |
It will be done automatically after CI. The programmer does not need to format their code beforehand. |
Why bother formatting after the build and deployment? IMO formatting benefits developers, not users. |
Formatting is always done after you commit your code to the repo, later developers (including my team and others) will download the formatted code. |
All source codes are now formatted.
clang-format.sh
should be run for new commits.The
.clang-format
file is updated. It is now corresponding to a style like the status quo.The
.clang-format-ignore
file is created for future use.A workflow to check the format is available now.
This PR is a continuation of #1524 .
What's next: