Skip to content

Commit 8e23556

Browse files
committed
review: be protected against everything
1 parent 467e7ac commit 8e23556

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

scripts/bench/bench_local.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ LINTER=$1
99
# ex: v1.59.0
1010
VERSION=$2
1111

12+
13+
if [ -z "$LINTER" ] || [ -z "$VERSION" ]; then
14+
cat <<-EOF
15+
Missing required arguments!
16+
17+
Usage: $0 <linter> <old version> <new version>
18+
Example: $0 gosec v1.58.1 v1.58.2
19+
EOF
20+
21+
exit 1
22+
fi
23+
24+
EOF
25+
1226
## Clean
1327

1428
function cleanBinaries() {

scripts/bench/bench_version.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ VERSION_OLD="$2"
1111
# ex: v1.58.2
1212
VERSION_NEW="$3"
1313

14+
if [ -z "$LINTER" ] || [ -z "$VERSION_OLD" ] || [ -z "$VERSION_NEW" ]; then
15+
cat <<-EOF
16+
Missing required arguments!
17+
18+
Usage: $0 <linter> <old version> <new version>
19+
Example: $0 gosec v1.58.1 v1.58.2
20+
EOF
21+
22+
exit 1
23+
fi
24+
25+
EOF
26+
1427
## Clean
1528

1629
function cleanBinaries() {

0 commit comments

Comments
 (0)