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

Add clang-format check as a part of the presubmit checks #475

Open
kammce opened this issue May 19, 2019 · 0 comments
Open

Add clang-format check as a part of the presubmit checks #475

kammce opened this issue May 19, 2019 · 0 comments
Labels
CI Feature, request or bug concerning the setup, build and continuous integration system
Milestone

Comments

@kammce
Copy link
Member

kammce commented May 19, 2019

Currently, the files need to be checked manually during review to see if they abide by the clang-format rules. What can be done instead is, each file is checked against what clang-format would have changed about the file. If the file and the clang-format file differ (meaning clang-format would have wanted to change it), it means the collaborator has two choices:

  1. Run clang-format on their file

OR

  1. They add clang-format guards to their code to keep clang-format from formatting a specific section of code (this could be a very neatly laid out array or structure).

Failing to have properly formatted code will result in the pre-submit failing.

@kammce kammce added the CI Feature, request or bug concerning the setup, build and continuous integration system label May 19, 2019
@kammce kammce added this to the Summer 2019 Q3 V1.2 milestone May 19, 2019
@kammce kammce removed this from the Summer 2019 Q3 V1.2 milestone Jul 8, 2019
@kammce kammce added this to the Backlog milestone May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Feature, request or bug concerning the setup, build and continuous integration system
Projects
None yet
Development

No branches or pull requests

1 participant