ClangTools: Prefer .clang-tidy file by default

... and move this setting outside the diagnostic config.

Fixes: QTCREATORBUG-28852
Change-Id: Ie3b19ba7bec2bc96451f3216fa06a6941cad4c94
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2023-04-11 12:49:21 +02:00
parent de0e0fab18
commit 4028777743
16 changed files with 83 additions and 79 deletions

View File

@@ -343,5 +343,13 @@ QString clazyDocUrl(const QString &check)
return QString::fromLatin1(urlTemplate).arg(versionString, check);
}
bool toolEnabled(CppEditor::ClangToolType type, const ClangDiagnosticConfig &config,
const RunSettings &runSettings)
{
if (type == ClangToolType::Tidy && runSettings.preferConfigFile())
return true;
return config.isEnabled(type);
}
} // namespace Internal
} // namespace ClangTools