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:
@@ -25,9 +25,13 @@ function simplify-gocase() {
|
|||||||
|
|
||||||
function token-coloncheck() {
|
function token-coloncheck() {
|
||||||
# add quotes to avoid matching three X's
|
# 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
|
return 1 # tokens must end with a colon
|
||||||
fi
|
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
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user