Apply non-time-sensitive prerequisites for clang-format to HEAD#29241
Apply non-time-sensitive prerequisites for clang-format to HEAD#29241bob-beck wants to merge 8 commits intoopenssl:masterfrom
Conversation
804e45a to
cfc4fb2
Compare
|
the style in some of these is wonky (as they themselves has been through many clang-formats) - I'm mostly ignoring this as clang-format will simply whack them all once applied anyway. |
|
Bah.. gotta fix one of them. wait one. |
cfc4fb2 to
b00777b
Compare
7d466ba to
4c98f8e
Compare
|
Hadn't run into CI where OSSL_LINE fails to set, needed to account for it. now fixed. |
4c98f8e to
6ede47b
Compare
Sashan
left a comment
There was a problem hiding this comment.
makes sense. I don't insist on my proposal I just think it's worth to consider.
nhorman
left a comment
There was a problem hiding this comment.
This looks fine to me once @t8m and @Sashan get their comments/questions addressed.
Also, should there be a corollary PR in https://github.com/openssl/technical-policies to replace the coding style document with some language that points people to the use of the clang-format file?
I have those changes in a seperate diff (it was included in the original clang-format show people what will happen stacks if you go back and look at those, and I solicited feedback on them at the time) Since I expect that to involve bikeshedding and delay, I have not included that in these stacks as they will be replicated on all branches, and are needed to get the things done. I will land the STYLE change separately. |
cc29500 to
43b38a3
Compare
Sashan
left a comment
There was a problem hiding this comment.
looks good to me. thanks.
|
This pull request is ready to merge |
|
Merged to the master branch. Thank you. |
Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29241)
In particular fix the regex magic to be tolerant of different ways of formatting a main program. My past life had forgotten this magic 14 years ago when we converted it to just a table of commands in the forks. https://www.youtube.com/watch?v=mWbbjvYmN8A Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29241)
(in it's final form it will work with either compiler because it's currently one line, but was tripped up before by the #ifdef, so redid it to be consistent with the other changes previously in this stack) While I am here correct the test to test for all possible return values of ERR_get_error_all, without the #ifdefs Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29241)
Similar to the previous errtest.c fix this also is not broken by any reformatting today, but this change makes this follow the same pattern as the other things that test OPENSSL_LINE after the fact so we maintain the same paradigm everywhere. Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29241)
They are not asm, but spit out stuff that is not C Clang-format gets confused and does bad things with them. Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29241)
If OPENSSL_LINE ends up on a different line than the following call here, this test breaks. We should perhaps reconsider if testing the reporting of OPENSSL_LINE is what we want in a malloc test, but that's for another time than now. Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29241)
we assume these to be order sensitive and not self contained, so as per our new style we disable clang format around them. we should consider renaming to .inc, or doing away with some of these and just putting the code inline, but that's for later consideration. Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29241)
Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#29241)
In particular fix the regex magic to be tolerant of different ways of formatting a main program. My past life had forgotten this magic 14 years ago when we converted it to just a table of commands in the forks. https://www.youtube.com/watch?v=mWbbjvYmN8A Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#29241)
(in it's final form it will work with either compiler because it's currently one line, but was tripped up before by the #ifdef, so redid it to be consistent with the other changes previously in this stack) While I am here correct the test to test for all possible return values of ERR_get_error_all, without the #ifdefs Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#29241)
Similar to the previous errtest.c fix this also is not broken by any reformatting today, but this change makes this follow the same pattern as the other things that test OPENSSL_LINE after the fact so we maintain the same paradigm everywhere. Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#29241)
They are not asm, but spit out stuff that is not C Clang-format gets confused and does bad things with them. Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#29241)
If OPENSSL_LINE ends up on a different line than the following call here, this test breaks. We should perhaps reconsider if testing the reporting of OPENSSL_LINE is what we want in a malloc test, but that's for another time than now. Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#29241)
we assume these to be order sensitive and not self contained, so as per our new style we disable clang format around them. we should consider renaming to .inc, or doing away with some of these and just putting the code inline, but that's for later consideration. Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#29241)
This does the preparatory work for HEAD to prepare for clang-format.
The equivalent to this will need to get done for all the branches as well.
This is not sensitive to the repository being frozen, as it does not yet make format changes to any file. All this does is add the clang-format file, and clean up some of our things that get in the way of reformatting the source code.
For 1657
And can be done across branches to reduce the day-of-reformat load.
Checklist