Clang formatter and a workflow for checking#1530
Clang formatter and a workflow for checking#1530cubicYYY wants to merge 1 commit intoSVF-tools:masterfrom
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 No newline at end of file | |||
There was a problem hiding this comment.
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.shshould be run for new commits.The
.clang-formatfile is updated. It is now corresponding to a style like the status quo.The
.clang-format-ignorefile is created for future use.A workflow to check the format is available now.
This PR is a continuation of #1524 .
What's next: