STYLE: Remove space between class and member names in C++ source files#2096
Conversation
ee97ee1 to
bdb852f
Compare
|
@hjmjohnson Do you also like this commit? I realize, you wrote that regarding code formatting, "automation is key", while this commit is only semi-automatic! If you don't like this commit, it would be OK to me to close the PR without merge. No problem. Because it's really a very minor cosmetic thing to me. But if you do like it, I think I should adjust the *.hxx files as well. |
hjmjohnson
left a comment
There was a problem hiding this comment.
@N-Dekker I love this commit !!
Please remove "WIP: and it can be merged".
@hjmjohnson Thanks, I'm glad to hear so :-) You know it's partially a matter of taste, so I can image that some people actually like to have a space before the For the sake of completeness, I think I should also do the *.hxx file, before the PR is ready! |
It appears that clang-format has in some cases introduced a space
character between `ClassName` and `::MemberName`. This typically seems
to have happened when there originally was a line break between the
class name and the member name.
This commit fixes the formatting by removing those spaces, as follows:
find . \( -iname *.cxx -and ! -path *ThirdParty* \) -exec perl -pi -w -e 's/([A-Z][a-z]+) \:\:([A-Z][a-z])/$1::$2/g;' {} \;
find . \( -iname *.hxx -and ! -path *ThirdParty* \) -exec perl -pi -w -e 's/([A-Z][a-z]+) \:\:([A-Z][a-z])/$1::$2/g;' {} \;
bdb852f to
60726f3
Compare
It appears that clang-format has in some cases introduced a space character between `ClassName` and `::MemberName`. This typically seems to have happened when there originally was a line break between the class name and the member name.
This commit fixes the formatting by removing those spaces, as follows:
find . \( -iname *.cxx \) -exec perl -pi -w -e 's/([A-Z][a-z]+) \:\:([A-Z][a-z])/$1::$2/g;' {} \;
Follows ITK:
- pull request InsightSoftwareConsortium/ITK#2096
- commit: InsightSoftwareConsortium/ITK@734d6f8
It appears that clang-format has in some cases introduced a space character between `ClassName` and `::MemberName`. This typically seems to have happened when there originally was a line break between the class name and the member name.
This commit fixes the formatting by removing those spaces, as follows:
find . \( -iname *.cxx \) -exec perl -pi -w -e 's/([A-Z][a-z]+) \:\:([A-Z][a-z])/$1::$2/g;' {} \;
Follows ITK:
- pull request InsightSoftwareConsortium/ITK#2096
- commit: InsightSoftwareConsortium/ITK@734d6f8
It appears that clang-format has in some cases introduced an unintended space character between the class name and the `::~`, in the definition of a destructor. This typically seems to have happened when there originally was a line break between the class name and the colon characters. Follow-up to: "STYLE: Remove space between class and member names in C++ source files" pull request InsightSoftwareConsortium#2096 commit 734d6f8
It appears that clang-format has in some cases introduced an unintended space character between the class name and the `::~`, in the definition of a destructor. This typically seems to have happened when there originally was a line break between the class name and the colon characters. Follow-up to: "STYLE: Remove space between class and member names in C++ source files" pull request InsightSoftwareConsortium#2096 commit 734d6f8
It appears that clang-format has in some cases introduced an unintended space character between the class name and the `::`, in the definition of an `operator`. Follow-up to: "STYLE: Remove space between class and member names in C++ source files" pull request InsightSoftwareConsortium#2096 commit 734d6f8
It appears that clang-format (version 8.0.1) has in some cases introduced an unintended space character between the class name and the `::`, in the definition of a destructor or overloaded `operator`. This typically seems to have happened when there originally was a line break between the class name and the colon characters. Follow-up to: "STYLE: Remove space between class and member names in C++ source files" pull request InsightSoftwareConsortium#2096 commit 734d6f8 Related to "Bug 44189 - clang-format does not remove space between non-macro identifier and ::", reported by Pablo Martin-Gomez, 2019-12-01 https://bugs.llvm.org/show_bug.cgi?id=44189
It appears that clang-format (version 8.0.1) has in some cases introduced an unintended space character between the class name and the `::`, in the definition of a destructor or overloaded `operator`. This typically seems to have happened when there originally was a line break between the class name and the colon characters. Follow-up to: "STYLE: Remove space between class and member names in C++ source files" pull request #2096 commit 734d6f8 Related to "Bug 44189 - clang-format does not remove space between non-macro identifier and ::", reported by Pablo Martin-Gomez, 2019-12-01 https://bugs.llvm.org/show_bug.cgi?id=44189
Removed spaces between class and member names of IO classes, that were accidentally introduced with pull request InsightSoftwareConsortium#1191 commit 2074c2f "STYLE: Enforce ITK style defined by .clang-format". Follow-up to pull request InsightSoftwareConsortium#2096 commit 734d6f8 "STYLE: Remove space between class and member names in C++ source files"
Removed spaces between class and member names, that were accidentally introduced with pull request InsightSoftwareConsortium#1191 commit 2074c2f "STYLE: Enforce ITK style defined by .clang-format". Using bash commands like: find . \( -iname *.cxx \) -exec perl -pi -w -e 's/([A-Z]\w+) \:\:(\w)/$1::$2/g;' {} \; Follow-up to pull request InsightSoftwareConsortium#2096 commit 734d6f8 "STYLE: Remove space between class and member names in C++ source files"
Removed spaces between class and member names, that were accidentally introduced with pull request #1191 commit 2074c2f "STYLE: Enforce ITK style defined by .clang-format". Using bash commands like: find . \( -iname *.cxx \) -exec perl -pi -w -e 's/([A-Z]\w+) \:\:(\w)/$1::$2/g;' {} \; Follow-up to pull request #2096 commit 734d6f8 "STYLE: Remove space between class and member names in C++ source files"
It appears that clang-format (version 8.0.1) has in some cases introduced an unintended space character between the class name and the `::`, in the definition of a destructor or overloaded `operator`. This typically seems to have happened when there originally was a line break between the class name and the colon characters. Follow-up to: "STYLE: Remove space between class and member names in C++ source files" pull request InsightSoftwareConsortium#2096 commit 4b95bbd Related to "Bug 44189 - clang-format does not remove space between non-macro identifier and ::", reported by Pablo Martin-Gomez, 2019-12-01 https://bugs.llvm.org/show_bug.cgi?id=44189
Removed spaces between class and member names, that were accidentally introduced with pull request InsightSoftwareConsortium#1191 commit 38e2d2d "STYLE: Enforce ITK style defined by .clang-format". Using bash commands like: find . \( -iname *.cxx \) -exec perl -pi -w -e 's/([A-Z]\w+) \:\:(\w)/$1::$2/g;' {} \; Follow-up to pull request InsightSoftwareConsortium#2096 commit 4b95bbd "STYLE: Remove space between class and member names in C++ source files"
It appears that clang-format has in some cases introduced a space
character between
ClassNameand::MemberName. This typically seemsto have happened when there originally was a line break between the
class name and the member name.
This commit fixes the formatting by removing those spaces, as follows: