forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIncompatibleOs.cpp
More file actions
28 lines (23 loc) · 1.03 KB
/
Copy pathIncompatibleOs.cpp
File metadata and controls
28 lines (23 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Unconditionally emits a diagnostic about running the autobuilder on an incompatible, non-macOS OS
// and exits with an error code.
//
// This is implemented as a C++ binary instead of a hardcoded JSON file so we can leverage existing
// diagnostic machinery for emitting correct timestamps, generating correct file names, etc.
#include "swift/logging/SwiftLogging.h"
const std::string_view codeql::programName = "extractor";
const std::string_view codeql::extractorName = "swift";
constexpr codeql::Diagnostic incompatibleOs{
.id = "incompatible-os",
.name = "Incompatible operating system (expected macOS)",
.action = "[Change the Actions runner][1] to run on macOS.\n\n"
"[1]: "
"https://docs.github.com/en/actions/using-workflows/"
"workflow-syntax-for-github-actions#jobsjob_idruns-on"};
static codeql::Logger& logger() {
static codeql::Logger ret{"main"};
return ret;
}
int main() {
DIAGNOSE_ERROR(incompatibleOs, "Currently, Swift analysis is only supported on macOS.");
return 1;
}