On Wed, Feb 12, 2025 at 02:23:28PM +0800, Lei Yu wrote: > On Wed, Feb 12, 2025 at 9:42 AM Patrick Williams wrote: > It's not a "fix" but a "workaround". It's always possible for a repo > to have a disabled-by-default config. > Instead, it's more like a bug in meson clang-tidy, that it is not > expected to check the code that is not configured to be built. No disagreement. I also see this as a bug in meson, but don't really care enough to debate that with them. If we can fix all our code to still be successful, we might as well do that. > Agreed. It's a meson clang-tidy issue. > What is your comment on this? Which files are expected to be checked > by clang-tidy? > a. **all** the c-like files in a repo > b. or just the files to be built > c. or ideally, the c-like files (including .h/hpp) configured to be built. (b), just the files to be built. I don't understand how you run clang-tidy on code that doesn't have compile_commands.json entries. The whole point of that compile_commands.json is to pass all the same -D directives, etc. to clang-tidy as you would to the compiler. There is no compile_commands.json entries for header files. -- Patrick Williams