forked from qt-creator/qt-creator
CppTools: Add convenience functions to ClangDiagnosticConfig
Change-Id: Iebf01e1ab71dc3500cc6e492c525735f300272ca Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -130,6 +130,11 @@ void ClangDiagnosticConfig::setClangTidyChecks(const QString &checks)
|
||||
m_clangTidyChecks = checks;
|
||||
}
|
||||
|
||||
bool ClangDiagnosticConfig::isClangTidyEnabled() const
|
||||
{
|
||||
return m_clangTidyMode != TidyMode::UseCustomChecks || clangTidyChecks() != "-*";
|
||||
}
|
||||
|
||||
QString ClangDiagnosticConfig::clazyChecks() const
|
||||
{
|
||||
return m_clazyChecks;
|
||||
@@ -140,6 +145,11 @@ void ClangDiagnosticConfig::setClazyChecks(const QString &checks)
|
||||
m_clazyChecks = checks;
|
||||
}
|
||||
|
||||
bool ClangDiagnosticConfig::isClazyEnabled() const
|
||||
{
|
||||
return m_clazyMode != ClazyMode::UseCustomChecks || !m_clazyChecks.isEmpty();
|
||||
}
|
||||
|
||||
static QString convertToNewClazyChecksFormat(const QString &checks)
|
||||
{
|
||||
// Before Qt Creator 4.9 valid values for checks were: "", "levelN".
|
||||
|
||||
Reference in New Issue
Block a user