-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Update reformatting settings, trace wrapping, and printf-format strings #22
Merged
Merged
Changes from 12 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ea24efe
Add BEGIN_FUNC / CATCH / END_FUNC to macros
qkoziol 337a231
Remove incorrect trailing '{'
qkoziol dea5cdd
Update trace script to wrap H5TRACE macros at 110 characters and improve
qkoziol 3897215
Clean up printf-formatting in H5public.h and correct some oversights …
qkoziol 5dd6650
Reformat with BEGIN_FUNC / END_FUNC handled correctly by clang-format
qkoziol 1024726
Merge remote-tracking branch 'hdfgroup/develop' into koziol/bug/fix_r…
qkoziol 1fc0211
Run clang-format on changes.
qkoziol 3342e8e
Correct H5_SIZEOF_HSIZE_T/H5_SIZEOF_HSSIZE_T macros to match typedef.
qkoziol 8dbbab1
And make the undef value match also.
qkoziol fe7934c
Update comment
qkoziol 65813ad
Update clang-format actions to exclude generated files.
qkoziol e1d082c
Merge remote-tracking branch 'hdfgroup/develop' into koziol/bug/fix_r…
qkoziol 2b81b9c
Post-process generated H5LTparse.h file as well as H5LTparse.c file.
qkoziol 45793a8
Fix formatting
qkoziol 7c77920
Update version of github clang-format action
qkoziol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,17 @@ jobs: | |
uses: DoozyX/[email protected] | ||
with: | ||
source: '.' | ||
extensions: 'c,h,cpp' | ||
extensions: 'c,h,cpp,hpp' | ||
clangFormatVersion: 10 | ||
style: file | ||
exclude: './config ./hl/src/H5LTanalyze.c' | ||
exclude: | ||
- ./config | ||
- ./hl/src/H5LTanalyze.c | ||
- ./hl/src/H5LTparse.c | ||
- ./hl/src/H5LTparse.h | ||
- ./src/H5Epubgen.h | ||
- ./src/H5Einit.h | ||
- ./src/H5Eterm.h | ||
- ./src/H5Edefin.h | ||
- ./src/H5version.h | ||
- ./src/H5overflow.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,26 @@ | ||
#!/bin/bash | ||
# | ||
# Recursively format all C & C++ sources and header files, except those in the | ||
# 'config' directory and generated files, such as H5LTanalyze.c, etc. | ||
# | ||
# Note that any files or directories that are excluded here should also be | ||
# added to the 'exclude' list in .github/workflows/clang-format-check.yml | ||
# | ||
# (Remember to update both bin/format_source and bin/format_source_patch) | ||
|
||
find . -type d \( -path ./config \) -prune \ | ||
-o -iname *.h -o -iname *.c -o -iname *.cpp -o -iname *.hpp \ | ||
-or \( \( \! \( \ | ||
-name H5LTanalyze.c \ | ||
-or -name H5LTparse.c \ | ||
-or -name H5LTparse.h \ | ||
-or -name H5Epubgen.h \ | ||
-or -name H5Einit.h \ | ||
-or -name H5Eterm.h \ | ||
-or -name H5Edefin.h \ | ||
-or -name H5version.h \ | ||
-or -name H5overflow.h \ | ||
\) \) \ | ||
-and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp \) \) \ | ||
| xargs clang-format -style=file -i -fallback-style=none | ||
|
||
exit 0 | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We should keep track of the versions somehow (There were some version 11 changes that would be nice).
It will likely depend on the version of clang on the ubuntu runner provided github.
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.
We should probably update the format_source script to detect the version of clang-format that's installed and use the correct formatting file. And maybe set a minimum version to use, so that our formatting is stable.