Skip to content
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

Update style of clang-format #2746

Merged
merged 8 commits into from
Aug 26, 2021
Merged

Conversation

JaySon-Huang
Copy link
Contributor

@JaySon-Huang JaySon-Huang commented Aug 23, 2021

What problem does this PR solve?

Issue Number: related to #2507

Problem Summary:

What is changed and how it works?

Ref: https://clang.llvm.org/docs/ClangFormatStyleOptions.html

Release note

None

@JaySon-Huang JaySon-Huang added the type/code-quality-improvement PR that can improve the code quality label Aug 23, 2021
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 23, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • solotzg

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 23, 2021
@SchrodingerZhu
Copy link
Contributor

LGTM

Copy link
Contributor

@solotzg solotzg left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 23, 2021
@solotzg
Copy link
Contributor

solotzg commented Aug 23, 2021

https://zed0.co.uk/clang-format-configurator/ This web can be used to edit & check format style online.
@fuzhe1989 @JaySon-Huang

@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 23, 2021
Copy link
Contributor

@fuzhe1989 fuzhe1989 left a comment

Choose a reason for hiding this comment

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

only a const override case hasn't been solved, we can fix it later.

@JaySon-Huang
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 24, 2021
@JaySon-Huang JaySon-Huang self-assigned this Aug 24, 2021
@JaySon-Huang
Copy link
Contributor Author

/merge cancel

@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Aug 24, 2021
@ti-chi-bot ti-chi-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 24, 2021
@JaySon-Huang
Copy link
Contributor Author

/hold
@fuzhe1989 want to reach an agreement on the coding style first

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 24, 2021
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 24, 2021
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 24, 2021
@solotzg
Copy link
Contributor

solotzg commented Aug 25, 2021

#2751 In this pr, format-check was disabled. We should enable it if format style is determined.

.clang-format Outdated Show resolved Hide resolved
Copy link
Contributor

@fuzhe1989 fuzhe1989 left a comment

Choose a reason for hiding this comment

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

LGTM

.clang-format Outdated Show resolved Hide resolved
Signed-off-by: JaySon-Huang <[email protected]>
* Set BinPackArguments && BinPackParameters to be false
* Set AllowAllParametersOfDeclarationOnNextLine to be false
* Set AllowShortFunctionsOnASingleLine to be Inline
* Set ColumnLimit to be 0
* Set SpaceAfterTemplateKeyword to be true
* PenaltyReturnTypeOnItsOwnLine
* Reset PenaltyReturnTypeOnItsOwnLine
* AlignAfterOpenBracket: Align
* AllowAllArgumentsOnNextLine: false

Signed-off-by: JaySon-Huang <[email protected]>
Signed-off-by: JaySon-Huang <[email protected]>
Signed-off-by: JaySon-Huang <[email protected]>
@JaySon-Huang
Copy link
Contributor Author

/unhold

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 25, 2021
@JaySon-Huang
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 95a2d6c

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 25, 2021
@solotzg
Copy link
Contributor

solotzg commented Aug 25, 2021

/rebuild

@ti-chi-bot ti-chi-bot merged commit 1b50582 into pingcap:master Aug 26, 2021
@JaySon-Huang JaySon-Huang deleted the update_format branch August 26, 2021 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. type/code-quality-improvement PR that can improve the code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants