-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-43979: [CI][C++][Dev] Add cpplint to pre-commit #43982
Conversation
|
^cpp/ | ||
exclude: >- | ||
( | ||
?\.grpc\.fb\.(cc|h)$| |
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.
The only nit is that this does not match the exclusion list that we have today in: https://github.com/apache/arrow/blob/main/cpp/build-support/lint_exclusions.txt
I can see some pyarrow
files there. We can merge this PR and add a follow up issue to add C++ linting to pre-commit to python and R (which seems to be what was originally linted)
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.
Good catch! I missed the file.
It seems that *windows_compatibility.h
difference is only affected for cpp/
.
But we can use cpplint for *windows_compatibility.h` now:
- https://github.com/apache/arrow/blob/main/cpp/src/arrow/util/windows_compatibility.h
- https://github.com/apache/arrow/blob/main/cpp/src/parquet/windows_compatibility.h
So this list is valid.
I also missed that R also uses cpplint: https://github.com/apache/arrow/blob/main/r/lint.sh
Let's work on it as a separated PR.
It seems that the current Python code base doesn't use cpplint.
BTW, I doubt that we need cpplint: #37396
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 just a nit that we can add as a follow up
I've added #43987 as a follow up issue (that we might want to do or not). |
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 089ad78. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 4 possible false positives for unstable benchmarks that are known to sometimes produce them. |
### Rationale for this change cpplint isn't integrated with pre-commit yet. ### What changes are included in this PR? * Add cpplint configuration * Share configuration with pre-commit and cpp/build-support/run_cpplint.py * Add pre-commit entry ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#43979 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
Rationale for this change
cpplint isn't integrated with pre-commit yet.
What changes are included in this PR?
Are these changes tested?
Yes.
Are there any user-facing changes?
No.