Skip to content

Commit c341063

Browse files
committed
Fix sarif collect
1 parent 4ad5f55 commit c341063

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/src/SARIFGenerator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ namespace sarif {
6666
if (lineInDescriptor.empty() || lineInDescriptor[0] == '#')
6767
continue;
6868
if (isspace(lineInDescriptor[0])) {
69-
if (key == "Stack") {
69+
if (key == "ExecutionStack") {
7070
const std::regex stack_regex(
71-
R"regex(\s+#(.*) in ([^ ]*) [(][^)]*[)] at ([^:]*):(\d+))regex");
71+
R"regex(\s+#(.*) in ([^ ]*)[(][^)]*[)] at ([^:]*):(\d+))regex");
7272
std::smatch stack_match;
7373
if (!std::regex_match(lineInDescriptor, stack_match, stack_regex)) {
7474
LOG_S(ERROR) << "wrong `Stack` line: " << lineInDescriptor;
@@ -129,7 +129,7 @@ namespace sarif {
129129
if (pos == std::string::npos) {
130130
LOG_S(ERROR) << "no key:" << lineInDescriptor;
131131
} else {
132-
if (key == "Stack") {
132+
if (key == "ExecutionStack") {
133133
// Check stack validity
134134
if (firstCallInStack) {
135135
LOG_S(ERROR) << "no visible stack in descriptor:" << descriptor;
@@ -147,7 +147,7 @@ namespace sarif {
147147
result["kind"] = "fail";
148148
} else if (key == ERROR_ID_KEY) {
149149
result["ruleId"] = value;
150-
} else if (key == "Stack") {
150+
} else if (key == "ExecutionStack") {
151151
stackLocations = json();
152152
codeFlowsLocations = json();
153153
} else if (key == TEST_FILE_KEY) {

0 commit comments

Comments
 (0)