Skip to content

Commit 1c36f6f

Browse files
author
Alvaro Muñoz
committed
Remove codeql distro dependencies
Do not clone CodeQL
1 parent 467e751 commit 1c36f6f

File tree

4 files changed

+15
-21
lines changed

4 files changed

+15
-21
lines changed

.github/scripts/pr-compile.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ LIBRARY_SCANNED=false
99
echo "[+] Compiling all queries in $LANGUAGE"
1010
gh codeql query compile \
1111
--threads=0 --check-only \
12-
--search-path=./codeql --additional-packs=./codeql:./codeql/misc \
1312
"./$LANGUAGE/"
13+
# --search-path=./codeql --additional-packs=./codeql:./codeql/misc \
1414

1515
for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
1616
if [[ ! -f "$file" ]]; then
@@ -25,17 +25,17 @@ for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
2525
gh codeql query compile \
2626
--threads=0 --check-only \
2727
--warnings=error \
28-
--search-path=./codeql --additional-packs=./codeql:./codeql/misc \
2928
"./$file"
29+
# --search-path=./codeql --additional-packs=./codeql:./codeql/misc \
3030

3131
# if lib folder is modified
3232
elif [[ "$file" == $LANGUAGE/lib/* ]] && [[ $LIBRARY_SCANNED == false ]]; then
3333
echo "[+] Libray changed, compiling all queries in $LANGUAGE"
3434
gh codeql query compile \
3535
--threads=0 --check-only \
3636
--warnings=error \
37-
--search-path=./codeql --additional-packs=./codeql:./codeql/misc \
3837
"./$LANGUAGE/"
38+
# --search-path=./codeql --additional-packs=./codeql:./codeql/misc \
3939
# set LIBRARY_SCANNED to true to prevent recompiling
4040
LIBRARY_SCANNED=true
4141

.github/scripts/pr-suites-packs.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
1313
# suite folder
1414
if [[ "$file" == $LANGUAGE/suites/**.qls ]]; then
1515
echo "[+] Compiling Suite: $file"
16-
gh codeql resolve queries \
17-
--search-path=./codeql \
18-
--additional-packs=./codeql:./codeql/misc \
19-
"$file"
16+
gh codeql resolve queries "$file"
17+
# --search-path=./codeql \
18+
# --additional-packs=./codeql:./codeql/misc \
2019

2120
# qlpack file and lock file
2221
elif [[ "$file" == $LANGUAGE/qlpack.yml ]] || [[ "$file" == $LANGUAGE/codeql-pack.lock.yml ]]; then

.github/scripts/pr-tests.sh

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ if [[ ! -d ./${LANGUAGE}/test/ ]]; then
1010
fi
1111

1212
echo "[+] Compiling all queries in $LANGUAGE"
13-
gh codeql query compile \
14-
--threads=0 --check-only \
15-
--search-path=./codeql --additional-packs=./codeql:./codeql/misc \
16-
"./$LANGUAGE/"
13+
gh codeql query compile --threads=0 --check-only "./$LANGUAGE/"
14+
# --search-path=./codeql --additional-packs=./codeql:./codeql/misc \
1715

1816
for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
1917
if [[ ! -f "$file" ]]; then
@@ -25,9 +23,8 @@ for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
2523
echo "[+] Test $file changed"
2624
TEST_DIR=$(dirname "$file")
2725
# run tests in the folder the change occured in
28-
gh codeql test run \
29-
--additional-packs=./ --additional-packs=./codeql \
30-
"$TEST_DIR"
26+
gh codeql test run "$TEST_DIR"
27+
# --additional-packs=./ --additional-packs=./codeql \
3128

3229
# if the files is a query file .ql or .qll
3330
elif [[ "$file" == $LANGUAGE/**.ql ]] || [[ "$file" == $LANGUAGE/**.qll ]] ; then
@@ -38,9 +35,8 @@ for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
3835

3936
if [[ -d "$TEST_DIR" ]]; then
4037
echo "[+] Running tests for $file -> $TEST_DIR"
41-
gh codeql test run \
42-
--additional-packs=./ --additional-packs=./codeql \
43-
"$TEST_DIR"
38+
gh codeql test run "$TEST_DIR"
39+
# --additional-packs=./ --additional-packs=./codeql \
4440

4541
else
4642
echo "[!] No tests found at $TEST_DIR"
@@ -52,9 +48,8 @@ for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
5248

5349
if [[ -d "$TEST_DIR" ]]; then
5450
echo "[+] Running tests for $file -> $TEST_DIR"
55-
gh codeql test run \
56-
--additional-packs=./ --additional-packs=./codeql \
57-
"$TEST_DIR"
51+
gh codeql test run "$TEST_DIR"
52+
# --additional-packs=./ --additional-packs=./codeql \
5853
else
5954
echo "[!] No tests found for $file (in $LANGUAGE)"
6055
fi

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
env:
3434
GITHUB_TOKEN: ${{ github.token }}
3535
run: |
36-
gh repo clone github/codeql
36+
# gh repo clone github/codeql
3737
gh extension install github/gh-codeql
3838
gh codeql pack download "codeql/${{ matrix.language }}-queries"
3939
gh codeql pack install "${{ matrix.language }}/lib"

0 commit comments

Comments
 (0)