cppcheck icon indicating copy to clipboard operation
cppcheck copied to clipboard

include all (internal non-generated) headers in clang-tidy checks

Open firewave opened this issue 3 years ago • 4 comments

firewave avatar May 11 '22 07:05 firewave

The EXTERNALS_AS_SYSTEM CMake option will be removed from this since it is not necessary and can be solved via a more selective regular expression.

firewave avatar Jun 06 '22 08:06 firewave

We need to exclude the generated headers which could be achieved by the (cli|gui|lib|oss-fuzz|test|triage)\/(?!ui_|temp\/).* regular expression but unfortunately LLVM doesn't support negative lookahead in their implementation.

firewave avatar Sep 16 '22 11:09 firewave

We need to exclude the generated headers which could be achieved by the (cli|gui|lib|oss-fuzz|test|triage)\/(?!ui_|temp\/).* regular expression but unfortunately LLVM doesn't support negative lookahead in their implementation.

I adjusted the regex to (cli|gui|lib|oss-fuzz|test|triage)\/[a-z]+\.h so it will only use files from the same depth which achieves the same since the generated files always live in temp subfolders.

firewave avatar Sep 22 '22 12:09 firewave

I will look into the explicit false positives/suppression in a separate PR. I will file tickets upstream and it seems we might still have some false positives ourselves (or simply some leftover suppressions).

I will also look into the readability-redundant-declaration at a later date as it requires some refactoring and does not cause any issues.

firewave avatar Oct 11 '22 19:10 firewave