Skip to content

Commit 346d5c4

Browse files
committed
Test sub-language file coverage in file baseline information check
We can do this now that the nightly has a version number starting with 2.15.0.
1 parent 5950d13 commit 346d5c4

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

.github/workflows/__export-file-baseline-information.yml

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

pr-checks/checks/export-file-baseline-information.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: "Export file baseline information"
22
description: "Tests that file baseline information is exported when the feature is enabled"
33
versions: ["nightly-latest"]
4+
env:
5+
CODEQL_ACTION_SUBLANGUAGE_FILE_COVERAGE: true
46
steps:
57
- uses: ./../action/init
68
id: init
79
with:
810
languages: javascript
911
tools: ${{ steps.prepare-test.outputs.tools-url }}
10-
env:
11-
CODEQL_FILE_BASELINE_INFORMATION: true
1212
- uses: ./../action/.github/actions/setup-swift
1313
with:
1414
codeql-path: ${{ steps.init.outputs.codeql-path }}
@@ -18,8 +18,6 @@ steps:
1818
- uses: ./../action/analyze
1919
with:
2020
output: "${{ runner.temp }}/results"
21-
env:
22-
CODEQL_FILE_BASELINE_INFORMATION: true
2321
- name: Upload SARIF
2422
uses: actions/upload-artifact@v3
2523
with:
@@ -30,13 +28,13 @@ steps:
3028
shell: bash
3129
run: |
3230
cd "$RUNNER_TEMP/results"
33-
expected_baseline_languages="cpp cs go java js py rb"
31+
expected_baseline_languages="c csharp go java kotlin javascript python ruby"
3432
if [[ $RUNNER_OS != "Windows" ]]; then
3533
expected_baseline_languages+=" swift"
3634
fi
3735
3836
for lang in ${expected_baseline_languages}; do
39-
rule_name="${lang}/baseline/expected-extracted-files"
37+
rule_name="cli/expected-extracted-files/${lang}"
4038
found_notification=$(jq --arg rule_name "${rule_name}" '[.runs[0].tool.driver.notifications |
4139
select(. != null) | flatten | .[].id] | any(. == $rule_name)' javascript.sarif)
4240
if [[ "${found_notification}" != "true" ]]; then

0 commit comments

Comments
 (0)