-
Notifications
You must be signed in to change notification settings - Fork 21
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
ci: add formatting check with each PR #433
ci: add formatting check with each PR #433
Conversation
✅ With the latest revision this PR passed the C/C++ code formatter. |
d5c8277
to
0bc5b7e
Compare
Benchmark results:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There’s an engineering policy question for Dmitry and his team: Are they expected to format (and check) locally code which they’ve touched before pushing, and/or are they willing to accept a certain amount of inconvenience from GitHub Action failures? The local testing I’ve been able to do (see previous comments) suggests that this won’t be an inordinate amount, but may be non-trivial.
A similar issue for clang-tidy had more GitHub Action failures than I’d hoped for, but didn’t elicit any objections that I’m aware of.
@FlashSheridan if I got the question right, we are ok to have a failure because of clang-format on CI. It's much better than merge an unformatted patch and then have irrelevant formatting changes committed with something else. We had a lot of that in the past, so I hope this PR will prevent such things in future. |
Agreed, and anyway that‘s an engineering policy decision which QA would be wise to stay out of. I was hoping for a third way, though, where an engineer could be sure before committing that his patch was properly formatted. (E.g. with a Git hook exactly matching CI, because it used the same script.) I think my technique above improves the odds, but I don’t know whether it properly handles configuration. (Sorry for the slow response — taking PTO for more revisions for Logique et Analyse.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Let's just prevent false-positives if possible, sir.
@antonbaliasnikov what prevents us from squashing and merging? |
@akiramenai , nothing. I was just waiting for the final confirmation that we're ok with the current implementation and behavior after reviews. I'm rebasing and merging then. |
a19319f
to
d6d7ffe
Compare
You got 2 LGTMs. If you think that we might overlooked something particular, let's discuss the concern. Otherwise, let's get it merged. |
d6d7ffe
to
81db40d
Compare
Code Review Checklist
Purpose
Adds diff formatting check with each PR.
Ticket Number
Fixes CPR-1054
Requirements
Implementation
Logic Errors and Bugs
code does not behave as intended?
that could break the code?
Error Handling and Logging
be added or removed?
written in a way that allows for easy
debugging?
Maintainability
Dependencies
Security
Performance
system performance?
performance of the code significantly?
Testing and Testability
that should be tested in addition?
Readability
smaller methods?
different function, method or variable names?
file/folder/package?
restructured to have a more intuitive control
flow?
better?
understandable?
Documentation
Best Practices
Experts' Opinion
expert or a usability expert, should look over
the code before it can be accepted?