2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2014-09-25 11:11:58 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2014-09-25 11:11:58 +02:00
|
|
|
|
2021-08-30 10:58:08 +02:00
|
|
|
#include <cppeditor/clangdiagnosticconfig.h>
|
2015-07-07 15:24:47 +02:00
|
|
|
|
2021-04-12 12:58:52 +02:00
|
|
|
#include <utils/id.h>
|
2020-07-21 13:11:01 +02:00
|
|
|
|
2014-09-25 11:11:58 +02:00
|
|
|
#include <QtGlobal>
|
|
|
|
|
|
2022-08-26 10:30:00 +02:00
|
|
|
#include <optional>
|
|
|
|
|
|
2021-08-30 10:58:08 +02:00
|
|
|
namespace CppEditor { class ClangDiagnosticConfigsModel; }
|
2016-03-02 13:57:37 +01:00
|
|
|
namespace Debugger { class DiagnosticLocation; }
|
2021-08-12 09:19:55 +02:00
|
|
|
namespace Utils { class FilePath; }
|
2015-06-19 15:37:16 +02:00
|
|
|
|
2018-03-14 12:58:12 +01:00
|
|
|
namespace ClangTools {
|
2014-09-25 11:11:58 +02:00
|
|
|
namespace Internal {
|
|
|
|
|
|
2021-06-24 16:25:40 +02:00
|
|
|
QString clangTidyDocUrl(const QString &check);
|
2021-07-26 15:42:28 +02:00
|
|
|
QString clazyDocUrl(const QString &check);
|
2021-06-24 16:25:40 +02:00
|
|
|
|
2020-07-21 13:11:01 +02:00
|
|
|
class Diagnostic;
|
|
|
|
|
|
|
|
|
|
enum class FixitStatus {
|
|
|
|
|
NotAvailable,
|
|
|
|
|
NotScheduled,
|
|
|
|
|
Scheduled,
|
|
|
|
|
Applied,
|
|
|
|
|
FailedToApply,
|
|
|
|
|
Invalidated,
|
|
|
|
|
};
|
|
|
|
|
|
2022-08-26 10:30:00 +02:00
|
|
|
QString createDiagnosticToolTipString(const Diagnostic &diagnostic,
|
|
|
|
|
std::optional<FixitStatus> status = std::nullopt,
|
|
|
|
|
bool showSteps = true);
|
2020-07-21 13:11:01 +02:00
|
|
|
|
2021-08-30 10:58:08 +02:00
|
|
|
CppEditor::ClangDiagnosticConfig builtinConfig();
|
2020-11-12 14:15:36 +01:00
|
|
|
|
2016-03-02 13:57:37 +01:00
|
|
|
QString createFullLocationString(const Debugger::DiagnosticLocation &location);
|
2014-09-25 11:11:58 +02:00
|
|
|
|
2019-06-25 11:10:00 +02:00
|
|
|
QString hintAboutBuildBeforeAnalysis();
|
|
|
|
|
void showHintAboutBuildBeforeAnalysis();
|
|
|
|
|
|
2023-01-10 16:36:59 +01:00
|
|
|
Utils::FilePath toolShippedExecutable(CppEditor::ClangToolType tool);
|
|
|
|
|
Utils::FilePath toolExecutable(CppEditor::ClangToolType tool);
|
|
|
|
|
Utils::FilePath toolFallbackExecutable(CppEditor::ClangToolType tool);
|
2019-10-21 14:59:57 +02:00
|
|
|
|
2021-08-12 09:19:55 +02:00
|
|
|
Utils::FilePath fullPath(const Utils::FilePath &executable);
|
2019-08-28 08:56:22 +02:00
|
|
|
|
2019-11-29 09:52:02 +01:00
|
|
|
QString documentationUrl(const QString &checkName);
|
|
|
|
|
|
2021-08-30 10:58:08 +02:00
|
|
|
CppEditor::ClangDiagnosticConfigsModel diagnosticConfigsModel();
|
|
|
|
|
CppEditor::ClangDiagnosticConfigsModel diagnosticConfigsModel(
|
|
|
|
|
const CppEditor::ClangDiagnosticConfigs &customConfigs);
|
2019-09-25 15:46:15 +02:00
|
|
|
|
2021-08-30 10:58:08 +02:00
|
|
|
CppEditor::ClangDiagnosticConfig diagnosticConfig(const Utils::Id &diagConfigId);
|
2020-07-22 14:52:06 +02:00
|
|
|
|
|
|
|
|
QStringList extraClangToolsPrependOptions();
|
|
|
|
|
QStringList extraClangToolsAppendOptions();
|
|
|
|
|
|
2021-04-12 12:58:52 +02:00
|
|
|
inline Utils::Id taskCategory() { return "ClangTools"; }
|
|
|
|
|
|
2014-09-25 11:11:58 +02:00
|
|
|
} // namespace Internal
|
2018-03-14 12:58:12 +01:00
|
|
|
} // namespace ClangTools
|