Skip to content
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 15 commits into from
Oct 6, 2020

Conversation

qkoziol
Copy link
Contributor

@qkoziol qkoziol commented Oct 5, 2020

Remove incorrect trailing '{' in src/H5C. that was confusing clang-format, align bin/trace with the line wrap limit that clang-format is using, update BEGIN_FUNC / END_FUNC macro settings for clang-format (for the H5EA*, H5FA*, and H5HL* files), and clean up and correct printf-format changes a little.

Copy link
Contributor

@gnuoyd gnuoyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hold on: what are you doing with the hsize_t/hssize_t typedefs and PRI.HSIZE?

@qkoziol
Copy link
Contributor Author

qkoziol commented Oct 6, 2020

The hsize_t/hssize_t typedefs should not be tied to a particular # of bits, they just need to be at least that many bits, and I updated the PRI*HSIZE macros to match.

@qkoziol qkoziol requested a review from gnuoyd October 6, 2020 03:51
@@ -5,14 +5,27 @@ AlignConsecutiveMacros: true
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlwaysBreakAfterReturnType: AllDefinitions
# Can enable the following section when llvm 12.x is out
Copy link
Contributor

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.

Copy link
Contributor Author

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.

hl/src/H5LTanalyze.c Outdated Show resolved Hide resolved
@gnuoyd
Copy link
Contributor

gnuoyd commented Oct 6, 2020 via email

@qkoziol
Copy link
Contributor Author

qkoziol commented Oct 6, 2020

The "upside" is source / binary / file format compatibility, as hsize_t is not specified as a particular size and tying it to one will create dependencies on this size in the future.

@gnuoyd
Copy link
Contributor

gnuoyd commented Oct 6, 2020 via email

@qkoziol
Copy link
Contributor Author

qkoziol commented Oct 6, 2020

OK, please approve so I can merge this. (Although we'll have to discuss other changes to the typedef in the future)

@qkoziol
Copy link
Contributor Author

qkoziol commented Oct 6, 2020

OK, I'll update the clang-format-check.yml file, thanks!

@qkoziol
Copy link
Contributor Author

qkoziol commented Oct 6, 2020

I've updated the clang-format scripts and the github actions to avoid processing generated files. As long as the checks pass, I believe that this is ready to merge.

@qkoziol
Copy link
Contributor Author

qkoziol commented Oct 6, 2020

Had to post-process the H5LTparse.h header also, for newer versions of bison...

Copy link
Contributor

@byrnHDF byrnHDF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is the config/cmake/HDF5_Process_Flex_files.cmake file that needs the same update for the .h file.

Of course, you could do the changes in my PR #24 for the gcc diags.(;{)

@qkoziol
Copy link
Contributor Author

qkoziol commented Oct 6, 2020

@byrnHDF - Sure, I can update that file, but where / how is it invoked? I need to add another parameter to it.

@byrnHDF
Copy link
Contributor

byrnHDF commented Oct 6, 2020 via email

@byrnHDF
Copy link
Contributor

byrnHDF commented Oct 6, 2020 via email

@byrnHDF
Copy link
Contributor

byrnHDF commented Oct 6, 2020 via email

@qkoziol
Copy link
Contributor Author

qkoziol commented Oct 6, 2020

@byrnHDF - I didn't change the .l file or your change to the genparser script, so I'm confused about what you are thinking of there. And, I like the idea of using the .clang-format-ignore file instead of the complicated scripts, etc, so I'll switch to that method, and update the PR (again :-) ).

@byrnHDF
Copy link
Contributor

byrnHDF commented Oct 6, 2020

Wow, talk about opening a can of worms!
Okay, that cmake file for flex bison must have been left over from way back as it is not used anywhere.
If you look at the H5LTanalyze.l file there is two sets of #ifdef block that do pragma lines 26-37, those should be moved to the genparser script with the others.

Finally there is a version 0.10 of the clang-format-check module see line 11:
uses: DoozyX/[email protected]

@qkoziol
Copy link
Contributor Author

qkoziol commented Oct 6, 2020

OK, the .clang-format-ignore is not going to work well, since it's specific to the clang-format workflow on github and I'd have to make another copy of the listed files. So, I just updated the yml file.

@qkoziol
Copy link
Contributor Author

qkoziol commented Oct 6, 2020

OK, I'll update those too. ;-)

Copy link
Contributor

@byrnHDF byrnHDF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@qkoziol
Copy link
Contributor Author

qkoziol commented Oct 6, 2020

@byrnHDF - I updated the github clang-format action version, but there's no pragmas in the H5LTanalyze.l file.

@byrnHDF
Copy link
Contributor

byrnHDF commented Oct 6, 2020

Okay good. Maybe I had already did that accidentally in a previous PR?

@qkoziol qkoziol merged commit 66bcfd9 into develop Oct 6, 2020
@qkoziol qkoziol deleted the koziol/bug/fix_reformat_etc branch October 6, 2020 22:37
vchoi-hdfgroup added a commit that referenced this pull request Jun 30, 2021
@bmribler bmribler mentioned this pull request Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants