From 27ac7481f91607f3757ad25ee0e241541a29e3af Mon Sep 17 00:00:00 2001 From: James Shubin Date: Wed, 19 Dec 2018 06:52:23 -0500 Subject: [PATCH] test: Increase the vet testing for irregular strings Catch some inconsistent comments to keep things neat. Hey, anything we can automate, we do :) --- test/test-govet.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/test-govet.sh b/test/test-govet.sh index 73a4dbb4..a9130043 100755 --- a/test/test-govet.sh +++ b/test/test-govet.sh @@ -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 }