From c7c170447208e3537636a074fabafe57e81ba7fa Mon Sep 17 00:00:00 2001 From: Aleksei Sviridkin Date: Sat, 11 Apr 2026 14:37:06 +0300 Subject: [PATCH] docs(hack): note whitespace caveat on BATS_UNIT_FILES wildcard $(wildcard ...) returns a space-separated list, so a bats file with a literal space in its name would silently split into multiple tokens in the subsequent 'for' loop. All current bats files use hyphen-separated names, so this is not an immediate risk, but the caveat is worth calling out so a future contributor who adopts a different naming convention rewrites the recipe instead of tripping over it. Assisted-By: Claude Signed-off-by: Aleksei Sviridkin --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 8daeabda..0e94c5e6 100644 --- a/Makefile +++ b/Makefile @@ -90,6 +90,12 @@ helm-unit-tests: # Discover every hack/*.bats file that is NOT an e2e test and run it # through cozytest.sh. Drop a new *.bats file in hack/ and it is picked # up automatically on the next `make unit-tests` run. +# +# Caveat: $(wildcard ...) returns space-separated names, so a filename +# containing a literal space would split into multiple tokens here. All +# current bats files use hyphen-separated names; if the project ever +# introduces whitespace-bearing filenames this recipe must be rewritten +# (e.g. to use `find ... -print0 | xargs -0`). BATS_UNIT_FILES := $(filter-out hack/e2e-%.bats,$(wildcard hack/*.bats)) bats-unit-tests: