makefiles/clang-tidy: initial support#16509
Merged
maribu merged 1 commit intoRIOT-OS:masterfrom Aug 31, 2021
Merged
Conversation
aabadie
reviewed
Jun 1, 2021
Comment on lines
+836
to
+837
| # inlcude clang-tidy | ||
| include $(RIOTMAKE)/clang_tidy.inc.mk |
Contributor
There was a problem hiding this comment.
Why not only include this if llvm toolchain is used (there's also a typo btw):
Suggested change
| # inlcude clang-tidy | |
| include $(RIOTMAKE)/clang_tidy.inc.mk | |
| # include clang-tidy if llvm toolchain is used | |
| ifeq (llvm,$(TOOLCHAIN)) | |
| include $(RIOTMAKE)/clang_tidy.inc.mk | |
| endif |
Then there's no need for the error message in clang_tidy.inc.mk (that I would rename clang-tidy.inc.mk but that's a matter of taste and I won't insist)
Contributor
Author
There was a problem hiding this comment.
I thought it made the target more visible that way.
maribu
approved these changes
Aug 31, 2021
Member
maribu
left a comment
There was a problem hiding this comment.
ACK. Works as advertised and is pretty useful :-)
Member
|
Without compile-tests another round of Murdock shouldn't take too long, and ruling out any |
Contributor
Author
|
Thanks for the review! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
This PR adds a make target to run clang-tidy. By default the considered source files will those that have been changed regarding to
BASE_BRANCHset to master by default.Testing procedure
On a branch different than master run
TOOLCHAIN=llvm make -C tests/event_timeout_ztimer/ clang-tidy