-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Replace cpplint with clang-format #55150
Conversation
Since we are adding a hook to pre-commit I'm guessing pre-commit.ci will have to be updated somehow to account for it. Does @MarcoGorelli or @lithomas1 know how that works? |
I think Marco's out on vacation right now, so I'll do my best to help. Can we try not using pocc's wrapper around clang-format? I think that one doesn't install clang-format for you, so it won't work on pre-commit CI. You can try adding something manual like pandas/.pre-commit-config.yaml Lines 131 to 388 in cc58350
(see the pyright one.
(I'm just typing this off of my head. Idea is to get pre-commit to pull clang-format off of conda. Don't expect it to work out of the box, though) |
Ah OK thanks. I'll give that a shot - didn't realize pocc was missing something compared to the other repo to auto install |
Any concerns on this one? |
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 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.
sorry for the delay, looks really good, nice one!
.pre-commit-config.yaml
Outdated
@@ -166,6 +153,15 @@ repos: | |||
types: [pyi] | |||
args: [scripts/run_stubtest.py] | |||
stages: [manual] | |||
- id: clang-format |
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.
Could you use https://github.com/pre-commit/mirrors-clang-format instead?
Thanks @WillAyd |
cpplint isn't seemingly well maintained and focuses on C++, which we aren't using. I think clang-format is a much better tool for our formatting