[Qt-creator] Error Using .clang-tidy file instead of built ins (Master branch from QtCreator Git Repo)

Björn Schäpers qt-maillist at hazardy.de
Sat Jan 23 22:46:57 CET 2021


https://codereview.qt-project.org/c/qt-creator/qt-creator/+/331233

Am 22.01.2021 um 17:50 schrieb Björn Schäpers:
> Hi,
>
> for me it seems that the default is just wrong. (And without blame I think 
> that I'm the responsible one, will look into it on the weekend.)
>
> Am 21.01.2021 um 22:51 schrieb Michael Jackson:
>> Just to follow up on my post, this diff seems to allow clang-tidy to run and 
>> use my configuration file. Not sure if that is the right way, I just took a 
>> very quick look at the sources without any sanity checking.
>>
>> diff --git a/src/plugins/clangtools/clangtidyclazyrunner.cpp 
>> b/src/plugins/clangtools/clangtidyclazyrunner.cpp
>> index 6b4ff3fac1..0c97d4993a 100644
>> --- a/src/plugins/clangtools/clangtidyclazyrunner.cpp
>> +++ b/src/plugins/clangtools/clangtidyclazyrunner.cpp
>> @@ -61,6 +61,8 @@ static QStringList tidyChecksArguments(const 
>> ClangDiagnosticConfig diagnosticCon
>>           return {"-config={}", "-checks=-clang-diagnostic-*"};
> Here it spells checks.
>
>>       if (tidyMode == ClangDiagnosticConfig::TidyMode::UseCustomChecks)
>>           return {"-config=" + diagnosticConfig.clangTidyChecksAsJson()};
>> +    if (tidyMode == ClangDiagnosticConfig::TidyMode::UseConfigFile)
>> +        return {"-format-style='file'"};
>>       return {"--warnings-as-errors=-*", "-check=-clang-diagnostic-*"};
> Here just check.
>
>>   }
>>
>> -- 
>> Mike Jackson
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20210123/19f7920f/attachment.html>


More information about the Qt-creator mailing list