-
-
Notifications
You must be signed in to change notification settings - Fork 82
feat: Add cppcheck lint aspect #617
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
base: main
Are you sure you want to change the base?
feat: Add cppcheck lint aspect #617
Conversation
|
c13a79a to
65fc0a8
Compare
6889850 to
47f06fa
Compare
47f06fa to
2e6eb8a
Compare
2e6eb8a to
80a4062
Compare
| build_file = "//tools/lint:cppcheck.BUILD", | ||
| integrity = "sha256-kacV5Qvy8pHqYoejdDCId4yS3VJDaqTqSJ9JgEIfQd0=", | ||
| strip_prefix = "cppcheckpremium-25.8.4", | ||
| urls = ["https://files.cppchecksolutions.com/25.8.4/ubuntu-22.04/cppcheckpremium-25.8.4-amd64.tar.gz"], |
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.
i am not sure if this okay, isn't cppcheckpremium a paid tool?
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.
That's true. There is also a free version, which can be installed with apt install cppcheck. I tried to use rules_distroless, but it does not work due to transitive dependencies. Do we need to model the tool in Bazel or can it be installed in the environment?


Add
cppcheckaslintaspect as per #569.A local test can be ran using:
cd example; bazel lint //src:hello_ccThe aspect supports human readable output and
xmloutput, e.g.cd example; bazel build //... --aspects=//tools/lint:linters.bzl%cppcheck --output_groups=rules_lint_xmlChanges are visible to end-users: yes
"Add cppcheck linter"
Test plan
cd example; bazel build //... --aspects=//tools/lint:linters.bzl%cppcheck --output_groups=rules_lint_xml: This will produce following output: