Skip to content

Reapply clang-format. #867

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

Merged

Conversation

BillyDonahue
Copy link
Contributor

@BillyDonahue BillyDonahue commented Jan 17, 2019

  $ clang-format -i -style=file \
        $(find  . | egrep '.*\.(h|cpp|inl)$')

Also did some manual commenting to keep test data lines from joining up,
since they rely on __LINE__ to be meaningful.

  $ clang-format -i -style=file \
        $(find  . | egrep '.*\.(h|cpp|inl)$')
@@ -630,7 +630,7 @@ Json::Value obj_value(Json::objectValue); // {}

void setComment(const char* text, size_t len);

char* comment_{nullptr};
char* comment_{ nullptr };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't really like this behavior, but it's what our .clang-format specifies so we'd better either accept it or change our .clang-format file.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have no preference, except for consistency. The status-quo is fine.

I'll also use clang-format in the future to maintain style consistency.

@@ -2354,14 +2354,22 @@ JSONTEST_FIXTURE(CharReaderAllowSpecialFloatsTest, issue209) {
JSONCPP_STRING in;
};
const TestData test_data[] = {
{ __LINE__, true, "{\"a\":9}" }, { __LINE__, false, "{\"a\":0Infinity}" },
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These obviously need to all be on their own row. The EOL comments tell clang-format not to join them.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

@@ -630,7 +630,7 @@ Json::Value obj_value(Json::objectValue); // {}

void setComment(const char* text, size_t len);

char* comment_{nullptr};
char* comment_{ nullptr };
Copy link
Contributor

Choose a reason for hiding this comment

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

I have no preference, except for consistency. The status-quo is fine.

I'll also use clang-format in the future to maintain style consistency.

@@ -2354,14 +2354,22 @@ JSONTEST_FIXTURE(CharReaderAllowSpecialFloatsTest, issue209) {
JSONCPP_STRING in;
};
const TestData test_data[] = {
{ __LINE__, true, "{\"a\":9}" }, { __LINE__, false, "{\"a\":0Infinity}" },
Copy link
Contributor

Choose a reason for hiding this comment

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

+1

@BillyDonahue BillyDonahue merged commit 6e7cbf8 into open-source-parsers:master Jan 17, 2019
@BillyDonahue BillyDonahue deleted the apply_clang_format branch January 17, 2019 20:30
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.

2 participants