ClangTool: Reindent properly runRecipe()

Otherwise the parent diff looks giant.

Change-Id: Ia3f8ef86ee81efd24f77f78a95955ffbab85dbd9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2024-01-13 02:10:47 +01:00
parent 4aec4e7ff7
commit 6f1fd5dc67

View File

@@ -766,37 +766,37 @@ Group ClangTool::runRecipe(const RunSettings &runSettings,
.arg(filePath, clangToolName(tool)), StdOutFormat); .arg(filePath, clangToolName(tool)), StdOutFormat);
return true; return true;
}; };
const auto outputHandler = [this, runSettings](const AnalyzeOutputData &output) { const auto outputHandler = [this, runSettings](const AnalyzeOutputData &output) {
if (!output.success) { if (!output.success) {
qCDebug(LOG).noquote() << "Clang tool task finished with an error:" qCDebug(LOG).noquote() << "Clang tool task finished with an error:"
<< output.errorMessage << '\n' << output.errorDetails; << output.errorMessage << '\n' << output.errorDetails;
++m_filesFailed; ++m_filesFailed;
const QString message = Tr::tr("Failed to analyze \"%1\": %2") const QString message = Tr::tr("Failed to analyze \"%1\": %2")
.arg(output.fileToAnalyze.toUserOutput(), output.errorMessage); .arg(output.fileToAnalyze.toUserOutput(), output.errorMessage);
// TODO: postMessage() instead // TODO: postMessage() instead
m_runControl->postMessage(message, StdErrFormat); m_runControl->postMessage(message, StdErrFormat);
m_runControl->postMessage(output.errorDetails, StdErrFormat); m_runControl->postMessage(output.errorDetails, StdErrFormat);
} else if (!output.errorMessage.isEmpty()) { } else if (!output.errorMessage.isEmpty()) {
m_runControl->postMessage(output.errorMessage, ErrorMessageFormat); m_runControl->postMessage(output.errorMessage, ErrorMessageFormat);
m_runControl->postMessage(output.errorDetails, StdErrFormat); m_runControl->postMessage(output.errorDetails, StdErrFormat);
} else { } else {
qCDebug(LOG) << "Clang tool task finished with success:" qCDebug(LOG) << "Clang tool task finished with success:"
<< output.outputFilePath; << output.outputFilePath;
++m_filesSucceeded; ++m_filesSucceeded;
const Diagnostics diagnostics = output.diagnostics; const Diagnostics diagnostics = output.diagnostics;
if (!diagnostics.isEmpty()) { if (!diagnostics.isEmpty()) {
// do not generate marks when we always analyze open files since marks from that // do not generate marks when we always analyze open files since marks from that
// analysis should be more up to date // analysis should be more up to date
const bool generateMarks = !runSettings.analyzeOpenFiles(); const bool generateMarks = !runSettings.analyzeOpenFiles();
onNewDiagnosticsAvailable(diagnostics, generateMarks); onNewDiagnosticsAvailable(diagnostics, generateMarks);
}
} }
updateForCurrentState(); }
}; updateForCurrentState();
const AnalyzeInputData input{tool, runSettings, diagnosticConfig, tempDir->path(), };
environment}; const AnalyzeInputData input{tool, runSettings, diagnosticConfig, tempDir->path(),
environment};
taskTree.setRecipe({clangToolTask(unitsToProcess, input, setupHandler, outputHandler)}); taskTree.setRecipe({clangToolTask(unitsToProcess, input, setupHandler, outputHandler)});
return SetupResult::Continue; return SetupResult::Continue;