test: Increase the vet testing for irregular strings

Catch some inconsistent comments to keep things neat. Hey, anything we
can automate, we do :)
This commit is contained in:
James Shubin
2018-12-19 06:52:23 -05:00
parent 9bc36be513
commit 27ac7481f9

View File

@@ -25,9 +25,13 @@ function simplify-gocase() {
function token-coloncheck() {
# add quotes to avoid matching three X's
if grep -Ei "[\/]+[\/]+[ ]*(FIXME[^:]|TODO[^:]|X"'X'"X[^:])" "$1"; then
if grep -Ei "[\/]+[\/]+[ ]*(T"'O''D'"O[^:]|F"'I''X''M'"E[^:]|X"'X'"X[^:])" "$1"; then
return 1 # tokens must end with a colon
fi
# tokens must be upper case
if grep -E "[t][Oo][Dd][Oo]|[Tt][Oo][Dd][o]|[f][Ii][Xx][Mm][Ee]|[Ff][Ii][Xx][Mm][e]|[x][Xx][Xx]|[Xx][Xx][x]" "$1"; then
return 1
fi
return 0
}