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 <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
parent
786ea8a7d8
commit
c7c1704472
1 changed files with 6 additions and 0 deletions
6
Makefile
6
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue