codechecker icon indicating copy to clipboard operation
codechecker copied to clipboard

.clang-tidy file can not implement

Open basakerhz opened this issue 4 years ago • 7 comments

Describe the bug .clang-tidy file can not implement

CodeChecker version compile with newest code on branch master (6.17)

.clang-tidy file can not implement

I have added a .clang-tidy file to make my own config for clang-tidy, but it didn't work, did I lose some steps about clang-tidy settings or any other thing? image

basakerhz avatar Jul 13 '21 08:07 basakerhz

If I delete a space in .clang-tidy on purpose, codechecker can recognize the syntax error: image

So I am so confused that did .clang-tidy file implemented or not?

basakerhz avatar Jul 13 '21 08:07 basakerhz

I think your problem is related to my PR: #3203

csordasmarton avatar Jul 13 '21 08:07 csordasmarton

@csordasmarton Thanks too much, I saw it , it's the same problem. By the way, does it will be fixed in next version ?

basakerhz avatar Jul 13 '21 08:07 basakerhz

@basakerhz I hope so that it will be merged in the next release. It's still under review. I will try to ping my colleague to review it.

csordasmarton avatar Jul 13 '21 09:07 csordasmarton

@csordasmarton Glad to hear that, thank you for your efforts🤗.

basakerhz avatar Jul 13 '21 09:07 basakerhz

@csordasmarton Hi, I want to only enable the rules about performance-*, so I disabled sensitive, and --enbale performance rule one by one , it seems worked, but the truth is our code was still checked by default rules , is that also a known issue? image actually: image

basakerhz avatar Jul 19 '21 02:07 basakerhz

Under the hood in case of Clang Tidy first it will enable all the checkers in the default profile first: https://github.com/Ericsson/codechecker/blob/ed16b5d58f75002b465ea0944be0abf071f0b958/analyzer/codechecker_analyzer/analyzers/config_handler.py#L170-L172 After it will iterate over all the checkers enabled or disabled by the command line parameters: https://github.com/Ericsson/codechecker/blob/ed16b5d58f75002b465ea0944be0abf071f0b958/analyzer/codechecker_analyzer/analyzers/config_handler.py#L201-L220

The list of checkers which are in the sensitive profile can be found in this file: https://github.com/Ericsson/codechecker/blob/master/config/labels/analyzers/clang-tidy.json And can be listed with the following command: CodeChecker checkers --analyzers clang-tidy --profile sensitive

csordasmarton avatar Dec 10 '21 11:12 csordasmarton