Skip to content

Commit 7e0df48

Browse files
committed
add option --save-cache and --threads
1 parent e03bcde commit 7e0df48

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scripts/analyze.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ then
5858
OUTPUT="/opt/results"
5959
fi
6060

61-
if [ -z $NUMBER_OF_THREADS ]
61+
if [ -z $THREADS ]
6262
then
63-
NUMBER_OF_THREADS="0"
63+
THREADS="0"
6464
fi
6565

6666
DB=$OUTPUT/codeql-db
6767

68-
# Set NUMBER_OF_THREADS
68+
# Set THREADS
6969

7070
# Show execution information
7171
echo "----------------"
@@ -85,13 +85,13 @@ fi
8585

8686
# Functions
8787
create_database() {
88-
print_green "Creating DB: codeql database create --language=$LANGUAGE $DB -s $SRC $OVERWRITE_FLAG"
89-
codeql database create --threads=$NUMBER_OF_THREADS --language=$LANGUAGE $DB -s $SRC $OVERWRITE_FLAG
88+
print_green "Creating DB: codeql database create --threads=$THREADS --language=$LANGUAGE $DB -s $SRC $OVERWRITE_FLAG"
89+
codeql database create --threads=$THREADS --language=$LANGUAGE $DB -s $SRC $OVERWRITE_FLAG
9090
}
9191

9292
scan() {
93-
print_green "Start Scanning: codeql database analyze --format=$FORMAT --output=$OUTPUT/issues.$FORMAT $DB $QS"
94-
codeql database analyze --format=$FORMAT --threads=$NUMBER_OF_THREADS --output=$OUTPUT/issues.$FORMAT $DB $QS
93+
print_green "Start Scanning: codeql database analyze --format=$FORMAT --threads=$THREADS $SAVE_CACHE_FLAG --output=$OUTPUT/issues.$FORMAT $DB $QS"
94+
codeql database analyze --format=$FORMAT --threads=$THREADS $SAVE_CACHE_FLAG --output=$OUTPUT/issues.$FORMAT $DB $QS
9595
}
9696

9797
convert_sarif_to_sast() {

0 commit comments

Comments
 (0)