Skip to content

Add support for clang-tidy with C and override clang-tidy args - #169

Merged
MarkSchofield merged 1 commit into
MarkSchofield:mainfrom
jejikeh:clang-tidy-c-experiment
Jul 26, 2026
Merged

Add support for clang-tidy with C and override clang-tidy args#169
MarkSchofield merged 1 commit into
MarkSchofield:mainfrom
jejikeh:clang-tidy-c-experiment

Conversation

@jejikeh

@jejikeh jejikeh commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

In order to use clang-tidy with C, we need to set CMAKE_C_CLANG_TIDY (see).

Also, I have found an issue with .clang-tidy configuration file, since the -checks= flag was overriding my config when using CLANG_TIDY_CHECKS. I have added a new flag, CLANG_TIDY_ARGS, to fully override the arguments passed to clang-tidy.

These changes should fix the setup for C and add the ability to set custom arguments without breaking compatibility.

@jejikeh
jejikeh requested a review from MarkSchofield as a code owner July 25, 2026 21:04
@MarkSchofield

Copy link
Copy Markdown
Owner

Thanks for the fixes!

@MarkSchofield
MarkSchofield merged commit 1a656e9 into MarkSchofield:main Jul 26, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants