Skip to content

Commit 65994db

Browse files
author
Alvaro Muñoz
committed
Clean scripts and workflows
1 parent 1c36f6f commit 65994db

File tree

4 files changed

+3
-21
lines changed

4 files changed

+3
-21
lines changed

.github/scripts/pr-compile.sh

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ LANGUAGE=${2}
77
LIBRARY_SCANNED=false
88

99
echo "[+] Compiling all queries in $LANGUAGE"
10-
gh codeql query compile \
11-
--threads=0 --check-only \
12-
"./$LANGUAGE/"
13-
# --search-path=./codeql --additional-packs=./codeql:./codeql/misc \
10+
gh codeql query compile --threads=0 --check-only "./$LANGUAGE/"
1411

1512
for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
1613
if [[ ! -f "$file" ]]; then
@@ -22,20 +19,12 @@ for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
2219
echo "[+] Compiling $file (in $LANGUAGE)"
2320

2421
# compile the query
25-
gh codeql query compile \
26-
--threads=0 --check-only \
27-
--warnings=error \
28-
"./$file"
29-
# --search-path=./codeql --additional-packs=./codeql:./codeql/misc \
22+
gh codeql query compile --threads=0 --check-only --warnings=error "./$file"
3023

3124
# if lib folder is modified
3225
elif [[ "$file" == $LANGUAGE/lib/* ]] && [[ $LIBRARY_SCANNED == false ]]; then
3326
echo "[+] Libray changed, compiling all queries in $LANGUAGE"
34-
gh codeql query compile \
35-
--threads=0 --check-only \
36-
--warnings=error \
37-
"./$LANGUAGE/"
38-
# --search-path=./codeql --additional-packs=./codeql:./codeql/misc \
27+
gh codeql query compile --threads=0 --check-only --warnings=error "./$LANGUAGE/"
3928
# set LIBRARY_SCANNED to true to prevent recompiling
4029
LIBRARY_SCANNED=true
4130

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
1414
if [[ "$file" == $LANGUAGE/suites/**.qls ]]; then
1515
echo "[+] Compiling Suite: $file"
1616
gh codeql resolve queries "$file"
17-
# --search-path=./codeql \
18-
# --additional-packs=./codeql:./codeql/misc \
1917

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

.github/scripts/pr-tests.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ fi
1111

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

1615
for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
1716
if [[ ! -f "$file" ]]; then
@@ -24,7 +23,6 @@ for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
2423
TEST_DIR=$(dirname "$file")
2524
# run tests in the folder the change occured in
2625
gh codeql test run "$TEST_DIR"
27-
# --additional-packs=./ --additional-packs=./codeql \
2826

2927
# if the files is a query file .ql or .qll
3028
elif [[ "$file" == $LANGUAGE/**.ql ]] || [[ "$file" == $LANGUAGE/**.qll ]] ; then
@@ -36,7 +34,6 @@ for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
3634
if [[ -d "$TEST_DIR" ]]; then
3735
echo "[+] Running tests for $file -> $TEST_DIR"
3836
gh codeql test run "$TEST_DIR"
39-
# --additional-packs=./ --additional-packs=./codeql \
4037

4138
else
4239
echo "[!] No tests found at $TEST_DIR"
@@ -49,7 +46,6 @@ for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
4946
if [[ -d "$TEST_DIR" ]]; then
5047
echo "[+] Running tests for $file -> $TEST_DIR"
5148
gh codeql test run "$TEST_DIR"
52-
# --additional-packs=./ --additional-packs=./codeql \
5349
else
5450
echo "[!] No tests found for $file (in $LANGUAGE)"
5551
fi

.github/workflows/build.yml

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

0 commit comments

Comments
 (0)