From 2e858ff4475dbfcde0c2cf4979894476887a7d85 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Mon, 8 Sep 2025 23:05:07 -0400 Subject: [PATCH] test: Improve colon test comment I use these patterns when early hacking, and it's good to have a test to catch them all before I merge. --- engine/resources/resources_test.go | 2 +- test/test-govet.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/resources/resources_test.go b/engine/resources/resources_test.go index 76ebcacf..3b649dc1 100644 --- a/engine/resources/resources_test.go +++ b/engine/resources/resources_test.go @@ -1688,7 +1688,7 @@ func TestResources2(t *testing.T) { fileAbsent(d2f1), fileAbsent(d2f2), fileAbsent(d2f3), - fileExists(p2, false), // ensure it's a file XXX !!! + fileExists(p2, false), // ensure it's a file fileExists(p3, true), // ensure it's a dir fileExists(p4, false), resCheckApply(r1, true), // it's already good diff --git a/test/test-govet.sh b/test/test-govet.sh index d7d810bb..bc788cc8 100755 --- a/test/test-govet.sh +++ b/test/test-govet.sh @@ -34,7 +34,8 @@ function simplify-gocase() { function token-coloncheck() { # add quotes to avoid matching three X's - if grep -Ei "[\/]+[\/]+[ ]*(T"'O''D'"O[^:]|F"'I''X''M'"E[^:]|X"'X'"X[^:])" "$1"; then + #if grep -Ei "[\/]+[\/]+[ ]*(T"'O''D'"O[^:]|F"'I''X''M'"E[^:]|X"'X'"X[^:])" "$1"; then + if grep -Ei "[\/]+[\/]+[\ 0-9a-zA-Z_@\*\?\'\(\)\{\}-]*(T"'O''D'"O[^:]|F"'I''X''M'"E[^:]|X"'X'"X[^:])" "$1"; then # not perfect return 1 # tokens must end with a colon fi # tokens must be upper case