forked from qt-creator/qt-creator
ClangTools: Fix clang-tidy command-line construction
Fixes: QTCREATORBUG-26015 Change-Id: I2850e6efa5b75748599f55e8b9c96757582f5cb4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -148,18 +148,18 @@ QString ClangDiagnosticConfig::clangTidyChecksAsJson() const
|
||||
return false;
|
||||
};
|
||||
|
||||
QString optionString;
|
||||
for (auto it = m_tidyChecksOptions.cbegin(); it != m_tidyChecksOptions.cend(); ++it) {
|
||||
if (!checkIsEnabled(it.key()))
|
||||
continue;
|
||||
QString optionString;
|
||||
for (auto optIt = it.value().begin(); optIt != it.value().end(); ++optIt) {
|
||||
if (!optionString.isEmpty())
|
||||
optionString += ',';
|
||||
optionString += "{key: '" + it.key() + '.' + optIt.key()
|
||||
+ "', value: '" + optIt.value() + "'}";
|
||||
}
|
||||
jsonString += optionString;
|
||||
}
|
||||
jsonString += optionString;
|
||||
return jsonString += "]}";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user