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

Enable code format check for PR #2706

Merged
merged 9 commits into from
Aug 22, 2021
Merged

Enable code format check for PR #2706

merged 9 commits into from
Aug 22, 2021

Conversation

solotzg
Copy link
Contributor

@solotzg solotzg commented Aug 17, 2021

Signed-off-by: Zhigao Tong [email protected]

What problem does this PR solve?

Issue Number: close #2507 , related #2619

Problem Summary:

What is changed and how it works?

What's Changed:

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch:

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 17, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • fuzhe1989

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/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 17, 2021
@solotzg solotzg added the type/enhancement The issue or PR belongs to an enhancement. label Aug 17, 2021
@solotzg
Copy link
Contributor Author

solotzg commented Aug 17, 2021

After this PR, we should only use one code format style https://github.com/pingcap/tics/blob/master/.clang-format. If you have any proposal, please modify branch https://github.com/pingcap/tics/tree/format-check directly.

@JaySon-Huang
Copy link
Contributor

After this PR, we should only use one code format style https://github.com/pingcap/tics/blob/master/.clang-format.

I think we should remove dbms/src/Storages/DeltaMerge/.clang-format, dbms/src/Storages/Page/.clang-format, dbms/src/Storages/Page/stable/.clang-format. Or editor (VS Code/vim) may format the files under those directories by those .clang-format files

@solotzg
Copy link
Contributor Author

solotzg commented Aug 17, 2021

After this PR, we should only use one code format style https://github.com/pingcap/tics/blob/master/.clang-format.

I think we should remove dbms/src/Storages/DeltaMerge/.clang-format, dbms/src/Storages/Page/.clang-format, dbms/src/Storages/Page/stable/.clang-format. Or editor (VS Code/vim) may format the files under those directories by those .clang-format files

Can you help to delete those files in branch format-check?

Signed-off-by: JaySon-Huang <[email protected]>
@ti-chi-bot ti-chi-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 17, 2021
@JaySon-Huang
Copy link
Contributor

Could we add a git-commit-hook for formatting? It would be better than only check the format in CI.

@solotzg
Copy link
Contributor Author

solotzg commented Aug 18, 2021

Could we add a git-commit-hook for formatting? It would be better than only check the format in CI.

I agree. But sometimes we still need to modify some places for testing or hacking. It's not friendly to check forcibly.

@JaySon-Huang
Copy link
Contributor

Could we add a git-commit-hook for formatting? It would be better than only check the format in CI.

I agree. But sometimes we still need to modify some places for testing or hacking. It's not friendly to check forcibly.

Then we can provide a command in the README.md that developers could check the format before submitting PRs

@solotzg
Copy link
Contributor Author

solotzg commented Aug 20, 2021

Can we merge this PR ?

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

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

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

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

LGTM

@solotzg
Copy link
Contributor Author

solotzg commented Aug 20, 2021

@flowbehappy PTAL

@SchrodingerZhu
Copy link
Contributor

/lgtm

@solotzg
Copy link
Contributor Author

solotzg commented Aug 22, 2021

/merge

@ti-chi-bot
Copy link
Member

@solotzg: 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: 2e37f05

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 22, 2021
@ti-chi-bot ti-chi-bot merged commit af67c86 into master Aug 22, 2021
@solotzg solotzg deleted the format-check branch August 22, 2021 13:52
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/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use clang-format in tics
5 participants