forked from apache/commons-csv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoverity_incremental.sh
More file actions
executable file
·47 lines (41 loc) · 1.38 KB
/
Copy pathcoverity_incremental.sh
File metadata and controls
executable file
·47 lines (41 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
#================================================================================
# Title : coverity_incremental.sh
# Author : Didier Botella
# Version : 1.2
# Date : 2025-04-16
# Description : Make an incremental analysis
#================================================================================
# À ajouter après le source des variables
required_vars=(
"COVERITY_URL"
"COV_USER"
"COVERITY_PASSPHRASE"
)
for var in "${required_vars[@]}"; do
if [ -z "${!var}" ]; then
echo "Error: $var is not set"
exit 1
fi
done
# Check if required tools are installed
# Replace 'mvn' with the actual tool name
if ! command -v mvn &>/dev/null; then
echo "Warning: mvn is not installed or not in PATH"
fi
# Check if required tools are installed
# Replace 'coverity' with the actual tool name
if ! command -v coverity &>/dev/null; then
echo "Warning: coverity is not installed or not in PATH"
fi
export COV_IDIR=idir
export COV_PROJECT=commons-csv
export COV_STREAM=commons-csv
coverity scan \
--incremental \
-o analyze.mode=hfi \
-o commit.connect.url="$COVERITY_URL" \
-o commit.connect.project="$COV_PROJECT" \
-o commit.connect.stream="$COV_STREAM" \
--dir "$COV_IDIR" \
-- mvn -Ddoclint=all --show-version --batch-mode --no-transfer-progress -Drat.skip=true -Dmaven.test.skip=true install