forked from qt-creator/qt-creator
ClangTools: Add tool that runs clang-tidy and clazy
... over the whole project. Generate and read serialized files to get diagnostics. Change-Id: Iafc25fc70443107a040a995efc038aed35102bbf Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -528,17 +528,12 @@ private:
|
||||
if (tidyMode == Mode::Disabled)
|
||||
return;
|
||||
|
||||
QString checks;
|
||||
if (tidyMode == Mode::ChecksPrefixList) {
|
||||
checks = QStringLiteral("-*") + diagnosticConfig.clangTidyChecksPrefixes();
|
||||
} else if (tidyMode == Mode::ChecksString) {
|
||||
checks = diagnosticConfig.clangTidyChecksString();
|
||||
checks = checks.simplified();
|
||||
checks.replace(" ", "");
|
||||
}
|
||||
|
||||
addXclangArg("-add-plugin", "clang-tidy");
|
||||
|
||||
if (tidyMode == Mode::File)
|
||||
return;
|
||||
|
||||
const QString checks = diagnosticConfig.clangTidyChecks();
|
||||
if (!checks.isEmpty())
|
||||
addXclangArg("-plugin-arg-clang-tidy", "-checks=" + checks);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user