Skip to content

Commit dd267e1

Browse files
committed
Ql-for-ql: Unified handling of in-tree extractor packs.
1 parent 57f7602 commit dd267e1

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

.github/workflows/ql-for-ql-build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ jobs:
4949
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-rust-cargo-${{ hashFiles('ql/**/Cargo.lock') }}
5050
- name: Release build
5151
if: steps.cache-extractor.outputs.cache-hit != 'true'
52-
run: cd ql; ./scripts/create-extractor-pack.sh
52+
run: cd ql; ./scripts/create-extractor-pack.sh
5353
env:
54-
GH_TOKEN: ${{ github.token }}
54+
GH_TOKEN: ${{ github.token }}
5555
- name: Cache compilation cache
5656
id: query-cache
5757
uses: ./.github/actions/cache-query-compilation
58-
with:
58+
with:
5959
key: run-ql-for-ql
6060
- name: Make database and analyze
6161
run: |
6262
./ql/target/release/buramu | tee deprecated.blame # Add a blame file for the extractor to parse.
63-
${CODEQL} database create -l=ql --search-path ql/extractor-pack ${DB}
63+
${CODEQL} database create -l=ql ${DB}
6464
${CODEQL} database analyze -j0 --format=sarif-latest --output=ql-for-ql.sarif ${DB} ql/ql/src/codeql-suites/ql-code-scanning.qls --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
65-
env:
65+
env:
6666
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
6767
DB: ${{ runner.temp }}/DB
6868
LGTM_INDEX_FILTERS: |

.github/workflows/ql-for-ql-dataset_measure.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ jobs:
5353
- name: Create database
5454
run: |
5555
"${CODEQL}" database create \
56-
--search-path "ql/extractor-pack" \
5756
--threads 4 \
5857
--language ql --source-root "${{ github.workspace }}/repo" \
5958
"${{ runner.temp }}/database"

.github/workflows/ql-for-ql-tests.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,23 @@ jobs:
4949
- name: Cache compilation cache
5050
id: query-cache
5151
uses: ./.github/actions/cache-query-compilation
52-
with:
52+
with:
5353
key: ql-for-ql-tests
5454
- name: Run QL tests
5555
run: |
56-
"${CODEQL}" test run --check-databases --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition --search-path "${{ github.workspace }}/ql/extractor-pack" --consistency-queries ql/ql/consistency-queries --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" ql/ql/test
56+
"${CODEQL}" test run --check-databases --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition --consistency-queries ql/ql/consistency-queries --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" ql/ql/test
5757
env:
5858
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
5959

60-
other-os:
60+
other-os:
6161
strategy:
6262
matrix:
6363
os: [macos-latest, windows-latest]
6464
needs: [qltest]
6565
runs-on: ${{ matrix.os }}
6666
steps:
6767
- uses: actions/checkout@v4
68-
- name: Install GNU tar
68+
- name: Install GNU tar
6969
if: runner.os == 'macOS'
7070
run: |
7171
brew install gnu-tar
@@ -100,13 +100,12 @@ jobs:
100100
- name: Run a single QL tests - Unix
101101
if: runner.os != 'Windows'
102102
run: |
103-
"${CODEQL}" test run --check-databases --search-path "${{ github.workspace }}/ql/extractor-pack" ql/ql/test/queries/style/DeadCode/DeadCode.qlref
103+
"${CODEQL}" test run --check-databases ql/ql/test/queries/style/DeadCode/DeadCode.qlref
104104
env:
105105
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
106106
- name: Run a single QL tests - Windows
107107
if: runner.os == 'Windows'
108108
shell: pwsh
109109
run: |
110110
$Env:PATH += ";$(dirname ${{ steps.find-codeql.outputs.codeql-path }})"
111-
codeql test run --check-databases --search-path "${{ github.workspace }}/ql/extractor-pack" ql/ql/test/queries/style/DeadCode/DeadCode.qlref
112-
111+
codeql test run --check-databases ql/ql/test/queries/style/DeadCode/DeadCode.qlref

0 commit comments

Comments
 (0)