Skip to content

Commit 880ce3c

Browse files
simonpasquiersquat
authored andcommitted
scripts/build-check-comments.sh: fix exit code (#1907)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
1 parent a105f96 commit 880ce3c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pkg/store/tsdb_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func TestTSDBStore_LabelNames(t *testing.T) {
7373
{
7474
title: "add another label",
7575
labels: []string{"bar", "bar"},
76-
// we will get two labels here
76+
// We will get two labels here.
7777
expectedNames: []string{"bar", "foo"},
7878
},
7979
} {

scripts/build-check-comments.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,15 @@ function check_comments {
9494
# option is used and a selected line is found.
9595
if test "0" == "${res}" # found something
9696
then
97-
printf "\n\n\n Error: Found comments without trailing period. Comments has to be full sentences.\n\n\n."
97+
printf "\n\n\n Error: Found comments without trailing period. Comments has to be full sentences.\n\n\n"
98+
exit 1
9899
elif test "1" == "${res}" # nothing found, all clear
99100
then
100101
printf "\n\n\n All comment formatting is good, Spartan.\n\n\n"
102+
exit 0
101103
else # grep error
102104
printf "\n\n\n Hmmm something didn't work, issues with grep?.\n\n\n"
105+
exit 2
103106
fi
104107
}
105108

0 commit comments

Comments
 (0)