STYLE: clang-format AlignEscapedNewlines Left (for macro definitions)#2790
Conversation
06e69a4 to
1f86caa
Compare
dzenanz
left a comment
There was a problem hiding this comment.
LGTM. Do @thewtex @hjmjohnson @blowekamp or @jhlegarreta have objections to this minor style change? Is an update of software guide needed for this?
Thanks @dzenanz With this pull request, "itkMacro.h" would go from 90 KB down to 78 KB 🎉 Update, October 12, 2021: Actually, with this pull request, "itkMacro.h" will go from 90 KB down to 74 KB 🎉🎉🎉 |
1f86caa to
e8ddfe0
Compare
e8ddfe0 to
caf10ce
Compare
|
Catch-22: clang-format locally adjusted my itkCheckHasFenvtStructMember.cxx But then KWStyle did not want me to commit, saying: And then the CI rejects the PR! 😢 Any suggestion? You see, the itk*.cxx files at Modules/Core/Common/CMake do not have a copyright notice. Should they? KWStyle thinks they should. So it rejects any commit with them. But if they don't pass KWStyle, how did they get into the repo in the first place?!? Update: Resolved by an extra commit: "STYLE: Fix KWStyle check errors from cxx files Modules/Core/Common/CMake" |
|
I have a microscopic preference for the historical format, even with the larger file size. I am not strongly opposed the the change, but I just don't care about saving 12kb of spaces. If this is included, I would ask that the hash be added to .git-blame-ignore-revs . |
caf10ce to
9173644
Compare
9173644 to
a75c092
Compare
|
Does this PR need rebasing now? |
Aligns escaped (`\`) newlines as far left as possible, according to https://clang.llvm.org/docs/ClangFormatStyleOptions.html Applies especially to macro definitions. Aims to fix a kwrobot-v1/ghostflow-check-master error at pull request InsightSoftwareConsortium#2785 "Remove virtual from Get/Set macro definitions", as reported by Dženan Zukić: > commit 8f26661 creates blob [...] at Modules/Core/Common/include/itkMacro.h > with size 101090 bytes (98.72 KiB) which is greater than the maximum > size 100000 bytes (97.66 KiB). If the file is intended to be > committed, set the hooks-max-size attribute on its path. Manually adjusted the six "clang-format off" sections in itkMacro.h according to the clang-format preferences.
a75c092 to
e90cc5f
Compare
@dzenanz Indeed... I just did! Took out the Fix KWStyle check errors from cxx files .../CMake commit, for clarity. Thank you for merging that one already 😃 |
Thanks for your feedback, @hjmjohnson. Update: This PR actually even saves 16 KB of spaces from "itkMacros.h" 😺: from 90 down to 74 KB! So it would certainly fix the ghostflow-check error at #2785, which rejects source files > 100000 bytes.
OK, although I guess that would make it harder in the future for people to figure out why and when this clang-format option was changed. |
|
One more approval, please... 😃 As Dženan already said, it's just a minor style change... |
As requested by Hans Johnson at InsightSoftwareConsortium#2790 (comment)
As requested by Hans Johnson at #2790 (comment)
As requested by Hans Johnson at InsightSoftwareConsortium#2790 (comment)
Aligns escaped (
\) newlines as far left as possible, according tohttps://clang.llvm.org/docs/ClangFormatStyleOptions.html
Applies especially to macro definitions.
Aims to fix a kwrobot-v1/ghostflow-check-master error at pull request
#2785
"Remove virtual from Get/Set macro definitions", as reported by
Dženan Zukić:
Tip of the day: when looking at the diff (Files changed) in GitHub, you may like to switch from "Split" to "Unified" view.