Swift extractor: Simplify declarations back

This commit is contained in:
Calum Grant 2024-01-16 11:31:15 +00:00
Родитель f400a5f49f
Коммит 7cadb0a574
4 изменённых файлов: 25 добавлений и 22 удалений

Просмотреть файл

@ -97,13 +97,15 @@ inline constexpr Diagnostic::Visibility operator&(Diagnostic::Visibility lhs,
static_cast<unsigned char>(rhs));
}
constexpr Diagnostic internalError = Diagnostic{
.id="internal-error", .name="Internal error",
.action="Some or all of the Swift analysis may have failed.\n"
"\n"
"If the error persists, contact support, quoting the error message and describing what "
"happened, or [open an issue in our open source repository][1].\n"
"\n"
"[1]: https://github.com/github/codeql/issues/new?labels=bug&template=ql---general.md",
.severity=Diagnostic::Severity::warning};
constexpr Diagnostic internalError{
.id = "internal-error",
.name = "Internal error",
.action =
"Some or all of the Swift analysis may have failed.\n"
"\n"
"If the error persists, contact support, quoting the error message and describing what "
"happened, or [open an issue in our open source repository][1].\n"
"\n"
"[1]: https://github.com/github/codeql/issues/new?labels=bug&template=ql---general.md",
.severity = Diagnostic::Severity::warning};
} // namespace codeql

Просмотреть файл

@ -8,10 +8,11 @@
#include "swift/logging/SwiftLogging.h"
#include "swift/swift-autobuilder/CustomizingBuildLink.h"
constexpr codeql::Diagnostic buildCommandFailed = codeql::Diagnostic{
.id="build-command-failed", .name="Detected build command failed",
.action="Set up a [manual build command][1] or [check the logs of the autobuild step][2].\n"
"\n[1]: " MANUAL_BUILD_COMMAND_HELP_LINK "\n[2]: " CHECK_LOGS_HELP_LINK};
constexpr codeql::Diagnostic buildCommandFailed{
.id = "build-command-failed",
.name = "Detected build command failed",
.action = "Set up a [manual build command][1] or [check the logs of the autobuild step][2].\n"
"\n[1]: " MANUAL_BUILD_COMMAND_HELP_LINK "\n[2]: " CHECK_LOGS_HELP_LINK};
static codeql::Logger& logger() {
static codeql::Logger ret{"build"};

Просмотреть файл

@ -14,15 +14,15 @@ static constexpr std::string_view unknownType = "<unknown_target_type>";
const std::string_view codeql::programName = "autobuilder";
const std::string_view codeql::extractorName = "swift";
constexpr codeql::Diagnostic noProjectFound = codeql::Diagnostic{
.id="no-project-found",
.name="No Xcode project or workspace found",
.action="Set up a [manual build command][1].\n\n[1]: " MANUAL_BUILD_COMMAND_HELP_LINK};
constexpr codeql::Diagnostic noProjectFound{
.id = "no-project-found",
.name = "No Xcode project or workspace found",
.action = "Set up a [manual build command][1].\n\n[1]: " MANUAL_BUILD_COMMAND_HELP_LINK};
constexpr codeql::Diagnostic noSwiftTarget = codeql::Diagnostic{
.id="no-swift-target",
.name="No Swift compilation target found",
.action="To analyze a custom set of source files, set up a [manual build "
constexpr codeql::Diagnostic noSwiftTarget{
.id = "no-swift-target",
.name = "No Swift compilation target found",
.action = "To analyze a custom set of source files, set up a [manual build "
"command][1].\n\n[1]: " MANUAL_BUILD_COMMAND_HELP_LINK};
static codeql::Logger& logger() {

Просмотреть файл

@ -9,7 +9,7 @@
const std::string_view codeql::programName = "autobuilder";
const std::string_view codeql::extractorName = "swift";
constexpr codeql::Diagnostic incompatibleOs = codeql::Diagnostic{
constexpr codeql::Diagnostic incompatibleOs{
.id = "incompatible-os",
.name = "Incompatible operating system (expected macOS)",
.action =