-
Notifications
You must be signed in to change notification settings - Fork 9
#2378: update .clang-format to match style guidelines
#2379
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
Conversation
0ccbc6e to
2d66457
Compare
|
887 files changed looks somewhat scary, but a lot of those changes are pretty innocent - adding missing spaces, adjusting line length etc. I will try to identify the key and potentially controversial changes (for example all |
|
Meeting notes: consider only running clang-format for recent changes (current PR) and adding comments / reporting in CI. |
80602f8 to
8fa0cf3
Compare
32d8f12 to
bf7d2ff
Compare
bf7d2ff to
4976a6f
Compare
288bae9 to
64ee88c
Compare
6e0de60 to
1a94d34
Compare
1a94d34 to
4feb925
Compare
126627b to
b1ab842
Compare
|
no modified files to format |
b1ab842 to
b0796c1
Compare
b0796c1 to
25dfdcd
Compare
| run: | | ||
| { | ||
| echo 'CLANG_FORMAT_DIFF<<EOF' | ||
| git clang-format-16 --diff origin/${{ github.base_ref }} || true |
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.
git clang-format-16 --diff origin/${{ github.base_ref }} || true is the core of the action, the rest is pretty much boilerplate and comment-posting code.
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.
Makes sense!
| } >> "$GITHUB_ENV" | ||
| - uses: actions/github-script@v7 | ||
| with: | ||
| script: | |
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.
This script part boils down to:
- find the comment id if the comment already exists
- create or update the comment with clang-format output
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.
This is pretty much the same what DARMA-tasking/comment-on-pr action does, but the script seems short enough to be put directly here.
lifflander
left a comment
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.
Looks great to me.
25dfdcd to
ca3aa8f
Compare
fixes #2378
.clang-formatfile to better match project's style guidelinesclang-formaton the PR changes and post a comment with the output (see #2378: update.clang-formatto match style guidelines #2379 (comment) for an example)The new
PR checks (clang-format)workflow will NOT fail when the style is not applied, for now this is purely informative.Misc notes: