-
Notifications
You must be signed in to change notification settings - Fork 901
opal: run clang-format on all of opal #8647
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
If it makes sense this can be broken down into many commits. Not sure what is preferred. |
:bot:retest:aws |
Let us suffer only once please. |
Ok. Let me run clang-tidy on opal to add braces to single-line control statements and add it as another commit here so that we get all the opal hurt at once. Will be adding the script to run it to contrib so it can be run whenever someone want to use it. |
aba87c4
to
4f50cc4
Compare
Some edits had to be done by hand as opal_datatype_internal.h is incorrectly detected as objective-c. This happens because the OPAL_DATATYPE_INIT_PTYPES_ARRAY macro seems to trip up clang-format. I intend to fix this bug upstream but for now it was fine to delete this definition, format the code, then re-add it to match the style guidelines. Signed-off-by: Nathan Hjelm <[email protected]>
To match Open MPI style guidelines all control statements must use braces even if they have a single statement. This commit fixes all sources that compile on macOS (limitation of clang-tidy that sources need to be compilable) in the opal subdir to match this guideline. Signed-off-by: Nathan Hjelm <[email protected]>
4f50cc4
to
5c6c7ff
Compare
Ok, this should be good now. I re-ran clang-format with the setting update then ran clang-tidy to add the missing braces and out that in as a separate commit. |
@hjelmn I'm getting reports that it's hard to cherry-pick opal changes to v5.0.x, presumably because we're missing the above. |
We should probably merge as many pr's (preferably all of them) from master to v5 first that are coming. That would probably help reduce the pain. |
Some edits had to be done by hand as opal_datatype_internal.h is incorrectly
detected as objective-c. This happens because the OPAL_DATATYPE_INIT_PTYPES_ARRAY
macro seems to trip up clang-format. I intend to fix this bug upstream but
for now it was fine to delete this definition, format the code, then re-add
it to match the style guidelines.
Signed-off-by: Nathan Hjelm [email protected]