mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Swift: add one more help link to diagnostics
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"helpLinks": [
|
||||
"https://docs.github.com/en/enterprise-server/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning"
|
||||
"https://docs.github.com/en/enterprise-server/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning",
|
||||
"https://docs.github.com/en/enterprise-server/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language"
|
||||
],
|
||||
"plaintextMessage": "The detected build command failed (tried /usr/bin/xcodebuild build -project <test-root-directory>/hello-failure.xcodeproj -target hello-failure CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO).\n\nSet up a manual build command.",
|
||||
"severity": "error",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"helpLinks": [
|
||||
"https://docs.github.com/en/enterprise-server/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning"
|
||||
"https://docs.github.com/en/enterprise-server/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning",
|
||||
"https://docs.github.com/en/enterprise-server/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language"
|
||||
],
|
||||
"plaintextMessage": "No Xcode project or workspace was found.\n\nSet up a manual build command.",
|
||||
"severity": "error",
|
||||
|
||||
12
swift/xcode-autobuilder/CustomizingBuildDiagnostics.h
Normal file
12
swift/xcode-autobuilder/CustomizingBuildDiagnostics.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <string_view>
|
||||
|
||||
namespace codeql_diagnostics {
|
||||
constexpr std::string_view customizingBuildAction = "Set up a manual build command";
|
||||
constexpr std::string_view customizingBuildHelpLinks =
|
||||
"https://docs.github.com/en/enterprise-server/code-security/code-scanning/"
|
||||
"automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning "
|
||||
"https://docs.github.com/en/enterprise-server/code-security/code-scanning/"
|
||||
"automatically-scanning-your-code-for-vulnerabilities-and-errors/"
|
||||
"configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-"
|
||||
"language";
|
||||
} // namespace codeql_diagnostics
|
||||
@@ -6,15 +6,12 @@
|
||||
#include "absl/strings/str_join.h"
|
||||
|
||||
#include "swift/logging/SwiftLogging.h"
|
||||
#include "swift/xcode-autobuilder/CustomizingBuildDiagnostics.h"
|
||||
|
||||
namespace codeql_diagnostics {
|
||||
constexpr codeql::SwiftDiagnosticsSource build_command_failed{
|
||||
"build_command_failed",
|
||||
"Detected build command failed",
|
||||
"Set up a manual build command",
|
||||
"https://docs.github.com/en/enterprise-server/code-security/code-scanning/"
|
||||
"automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning",
|
||||
};
|
||||
"build_command_failed", "Detected build command failed", customizingBuildAction,
|
||||
customizingBuildHelpLinks};
|
||||
}
|
||||
|
||||
static codeql::Logger& logger() {
|
||||
|
||||
@@ -10,15 +10,12 @@
|
||||
#include "swift/xcode-autobuilder/XcodeWorkspaceParser.h"
|
||||
#include "swift/xcode-autobuilder/CFHelpers.h"
|
||||
#include "swift/logging/SwiftLogging.h"
|
||||
#include "swift/xcode-autobuilder/CustomizingBuildDiagnostics.h"
|
||||
|
||||
namespace codeql_diagnostics {
|
||||
constexpr codeql::SwiftDiagnosticsSource no_project_found{
|
||||
"no_project_found",
|
||||
"No Xcode project or workspace detected",
|
||||
"Set up a manual build command",
|
||||
"https://docs.github.com/en/enterprise-server/code-security/code-scanning/"
|
||||
"automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning",
|
||||
};
|
||||
"no_project_found", "No Xcode project or workspace detected", customizingBuildAction,
|
||||
customizingBuildHelpLinks};
|
||||
} // namespace codeql_diagnostics
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
Reference in New Issue
Block a user