[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
Fri Jan 22 17:50:32 CET 2021
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20210122/dce6f372/attachment.html>
More information about the Qt-creator
mailing list