Skip to content

Commit

Permalink
scripts/build-check-comments.sh: fix exit code (#1907)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
  • Loading branch information
simonpasquier authored and squat committed Dec 18, 2019
1 parent a105f96 commit 880ce3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/store/tsdb_test.go
Expand Up @@ -73,7 +73,7 @@ func TestTSDBStore_LabelNames(t *testing.T) {
{
title: "add another label",
labels: []string{"bar", "bar"},
// we will get two labels here
// We will get two labels here.
expectedNames: []string{"bar", "foo"},
},
} {
Expand Down
5 changes: 4 additions & 1 deletion scripts/build-check-comments.sh
Expand Up @@ -94,12 +94,15 @@ function check_comments {
# option is used and a selected line is found.
if test "0" == "${res}" # found something
then
printf "\n\n\n Error: Found comments without trailing period. Comments has to be full sentences.\n\n\n."
printf "\n\n\n Error: Found comments without trailing period. Comments has to be full sentences.\n\n\n"
exit 1
elif test "1" == "${res}" # nothing found, all clear
then
printf "\n\n\n All comment formatting is good, Spartan.\n\n\n"
exit 0
else # grep error
printf "\n\n\n Hmmm something didn't work, issues with grep?.\n\n\n"
exit 2
fi
}

Expand Down

0 comments on commit 880ce3c

Please sign in to comment.