-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Feat: clang-tidy for linting of C/C++ code #287
Conversation
I'm fairly happy with this, it's getting closer now... Supported:
Needs discussion:
Known limitations:
Separate and general windows issues (to be tackled separately)
|
I'm okay landing this without windows support, we don't have testing there currently https://github.com/aspect-build/rules_lint/blob/main/.bcr/presubmit.yml#L5 so there's an existing project to fix it. Not many OSS contributors enthusiastic about both Bazel and Windows because so much is broken, but I hope to help fix that :)
Yes let's make a separate PR to add Windows testing for existing code |
@alexeagle thanks, agreed we need separate tracking for windows. Would be good to get this in for linux for now. I've removed the windows_workaround.bat. Please would you restart CI? I've fixed some of the failures. |
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.
Awesome, excited to have this. /cc @jsharpe
@alexeagle looks like there are 3 ci pipelines failing... are they due to this PR? I couldn't see the relationship between this change and the starlark failures... Can I run the integration tests myself, to see what the issue is there? |
@alexeagle have pushed a fix for latest ci run |
I ran buildifier locally and corrected what it pointed out, see the most recent commit. |
Awesome, thanks for your help @alexeagle. What are your thoughts? I'm happy to do more work if needed on this, either before or after merge. |
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 ship and get some user feedback 👍🏻
Amazing! Thank you for your help with this 🥳 |
Support clang-tidy for linting of C++ code.
Inspired by and containing some code from bazel_clang_tidy repo. This integration has been discussed by maintainers of both repos in erenon/bazel_clang_tidy#35.
This PR replaces #284, which had become noisy with too many commits. Since then, the code has been rewritten to return a single report for each target.
Fixes #178
Changes are visible to end-users: yes
Test plan
Code used from bazel_clang_tidy repo
bazel_clang_tidy repo helped:
The bulk of the code is implemented by following existing rules_lint code such as ruff.bzl and eslint.bzl.
Input into release notes (will reformat)