Cppcheck: Escape error message format string

Some shells try to expand {} otherwise.

Fixes: QTCREATORBUG-27284
Change-Id: Ifd2bd7bc58f005339eebd150b98ced59395d24bc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Sergey Morozov
2022-04-30 23:10:26 +03:00
parent cc2146f591
commit 11544df48b

View File

@@ -118,7 +118,7 @@ void CppcheckTool::updateArguments()
if (!m_options.unusedFunction && !m_options.customArguments.contains("-j "))
arguments.push_back("-j " + QString::number(QThread::idealThreadCount()));
arguments.push_back("--template={file},{line},{severity},{id},{message}");
arguments.push_back("--template=\"{file},{line},{severity},{id},{message}\"");
m_runner->reconfigure(m_options.binary, arguments.join(' '));
}