-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Support clang-tidy (early PR for review) #284
Conversation
Known issues with this MR:
Known issues with repo on windows, not related to this MR:
|
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.
Wow, this looks like a great start. I'll find some more time to comb through the details soon.
############################################### | ||
# START COPY CODE FROM private/lint_aspect.bzl | ||
# | ||
# this code needed to be changed to support generation of a report file |
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.
Interesting, why is clang-tidy the only tool that needs to produce different number of reports? I think this will break the API this ruleset exposes to surrounding tools that want to present the results - they assume there is a report for each action. Maybe we can merge them?
I'm replacing this PR with #287, addressing the comment about report files and cleaning up the commit history. |
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.
Changes are visible to end-users: yes
Test plan
Needs discussion
Code used from bazel_clang_tidy repo
Two helper functions toolchain_flags and safe_flags have been copied from bazel_clang_tidy and used in clang_tidy.bzl. Also, some lines in get_args are copied from bazel_clang_tidy. bazel_clang_tidy was also a very helpful learning tool in how to integrate clang-tidy into a bazel aspect. The rest of the code is implemented by following existing rules_lint code such as ruff.bzl and eslint.bzl.
Release notes (early input, will reformat)