test: Avoid matching three X's

This helps my "WIP" detector script avoid false positives. It is a
simple script which helps me find release critical problems.
This commit is contained in:
James Shubin
2017-03-01 22:37:08 -05:00
parent 73ccbb69ea
commit 5f060d60a7
3 changed files with 4 additions and 3 deletions

View File

@@ -22,7 +22,8 @@ function simplify-gocase() {
}
function token-coloncheck() {
if grep -Ei "[\/]+[\/]+[ ]*+(FIXME[^:]|TODO[^:]|XXX[^:])" "$1"; then
# add quotes to avoid matching three X's
if grep -Ei "[\/]+[\/]+[ ]*+(FIXME[^:]|TODO[^:]|X"'X'"X[^:])" "$1"; then
return 1 # tokens must end with a colon
fi
return 0