-
Notifications
You must be signed in to change notification settings - Fork 792
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
[bazel] Change clang-tidy rules into test rules #18763
[bazel] Change clang-tidy rules into test rules #18763
Conversation
This enables targets instantiated by the clang-tidy rules to depend on test targets. Issue lowRISC#18726 Signed-off-by: Dan McArdle <[email protected]>
I'll also add |
That looks great. |
Signed-off-by: Dan McArdle <[email protected]>
Thanks! Running clang-tidy as a test instead of a build step would add a small amount of complexity, which I just wanted to avoid in this PR. I think we'd need to accumulate each build command into a shell script rather than immediately dispatching to I've been thinking of the Bazel aspect as a shadow of the build graph, so I just wanted to mirror the C compilation actions with clang-tidy actions. (Now that I'm making these rules into test rules, maybe I should reevaluate this position that clang-tidy is more like a build step than a test.) I chose not to repurpose the |
I see, this makes a lot of sense now, it's probably simpler this way. |
I'm testing it now. Appears to be fixed. |
I spoke too soon. I see this failure now: INFO: From Running clang tidy on sw/device/silicon_creator/rom/keys/fake/sigverify_rsa_keys_fake.c: INFO: From Running clang tidy on sw/device/silicon_creator/rom/keys/fake/spx/sigverify_spx_keys_fake.c: Use --sandbox_debug to see verbose messages from the sandbox |
@dbeitel-opentitan Thanks for pointing that out. The //quality:clang_tidy_check target is very new. Rather than incrementally chiseling away at the failures, I'll just remove clang-tidy's warnings-as-errors behavior for now. |
This enables targets instantiated by the clang-tidy rules to depend on test targets.
Issue #18726