Skip to content

Commit a2e96a4

Browse files
committed
Add pack download to its own log group
Also, make the baseline count message less awkward sounding.
1 parent 96e7de3 commit a2e96a4

10 files changed

Lines changed: 54 additions & 22 deletions

.github/workflows/pr-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
EXPECTED_RULES="javascript/example/empty-or-one-block javascript/example/empty-or-one-block javascript/example/two-block"
137137
138138
# use tr to replace newlines with spaces and xargs to trim leading and trailing whitespace
139-
RULES="$(cat javascript-custom.sarif | jq -r '.runs[0].results[].ruleId' | sort | tr "\n" " " | xargs)"
139+
RULES="$(cat javascript.sarif | jq -r '.runs[0].results[].ruleId' | sort | tr "\n" " " | xargs)"
140140
echo "Found matching rules '$RULES'"
141141
if [ "$RULES" != "$EXPECTED_RULES" ]; then
142142
echo "Did not match expected rules '$EXPECTED_RULES'."

lib/analyze.js

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze.test.js

Lines changed: 11 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/config-utils.test.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/config-utils.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/analyze.test.ts

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,31 @@ test("status report fields and search path setting", async (t) => {
136136
getRunnerLogger(true)
137137
);
138138
const hasPacks = language in packs;
139-
t.deepEqual(Object.keys(builtinStatusReport).length, hasPacks ? 2 : 1);
140-
t.true(
141-
`analyze_builtin_queries_${language}_duration_ms` in builtinStatusReport
142-
);
143-
t.true(
144-
`interpret_results_${language}_duration_ms` in builtinStatusReport
145-
);
139+
const statusReportKeys = Object.keys(builtinStatusReport).sort();
140+
if (hasPacks) {
141+
t.deepEqual(statusReportKeys.length, 3, statusReportKeys.toString());
142+
t.deepEqual(
143+
statusReportKeys[0],
144+
`analyze_builtin_queries_${language}_duration_ms`
145+
);
146+
t.deepEqual(
147+
statusReportKeys[1],
148+
`analyze_custom_queries_${language}_duration_ms`
149+
);
150+
t.deepEqual(
151+
statusReportKeys[2],
152+
`interpret_results_${language}_duration_ms`
153+
);
154+
} else {
155+
t.deepEqual(
156+
statusReportKeys[0],
157+
`analyze_builtin_queries_${language}_duration_ms`
158+
);
159+
t.deepEqual(
160+
statusReportKeys[1],
161+
`interpret_results_${language}_duration_ms`
162+
);
163+
}
146164

147165
config.queries[language] = {
148166
builtin: [],

0 commit comments

Comments
 (0)