git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 2/2] t0450: add allowlist for builtins with missing .adoc

From
Toon Claes <toon@iotcl.com>
Date
Aug 8, 2025, 09:59 UTC
Message-ID
<20250808095943.3312265-3-toon@iotcl.com>
In-Reply-To
<20250804073002.1586332-1-toon@iotcl.com>

Before we were silently skipping all builtins that don't have a matching .adoc file. This is overly loose and might skip documentation files when it shouldn't, for example when there was a typo in the filename.

To ensure no new builtins are added without documentation, add an allowlist: t0450/adoc-missing. In this file only builtin commands that do *not* have a corresponding .adoc file shall be listed. If there is a mismatch, fail the test. This should force future contributions to either add an .adoc, or add the builtin name to the allowlist file.

Signed-off-by: Toon Claes <toon@iotcl.com>
---
 t/t0450-txt-doc-vs-help.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/t/t0450-txt-doc-vs-help.sh b/t/t0450-txt-doc-vs-help.sh
index da2d0af5b0..980130be78 100755
--- a/t/t0450-txt-doc-vs-help.sh
+++ b/t/t0450-txt-doc-vs-help.sh
@@ -112,10 +112,16 @@ do
 	adoc="$(builtin_to_adoc "$builtin")" &&
 	preq="$(echo BUILTIN_ADOC_$builtin | tr '[:lower:]-' '[:upper:]_')" &&
 
-	if test -f "$adoc"
+	# if and only if *.adoc is missing, builtin shall be listed in t0450/adoc-missing
+	result=success
+	if grep -q "^$builtin$" "$TEST_DIRECTORY"/t0450/adoc-missing
 	then
 		test_set_prereq "$preq"
+		result=failure
 	fi &&
+	test_expect_$result "$builtin appropriately marked as having missing .adoc" '
+		test -f "$adoc"
+	'
 
 	# *.adoc output assertions
 	test_expect_success "$preq" "$builtin *.adoc SYNOPSIS has dashed labels" '
-- 
2.50.1.327.g047016eb4a
Previous: Toon ClaesNext: Junio C Hamano
Message 6 of 12 in “t0450: fix test for out-of-tree builds”
  1. t0450: fix test for out-of-tree buildsToon Claes, Aug 4, 2025
  2. Patrick SteinhardtAug 4, 2025
  3. Toon ClaesAug 5, 2025
  4. 0/2 Harden test t0450-txt-doc-vs-helpToon Claes, Aug 8, 2025
  5. 1/2 t0450: fix test for out-of-tree buildsToon Claes, Aug 8, 2025
  6. 2/2 t0450: add allowlist for builtins with missing .adocToon Claes, Aug 8, 2025
  7. Junio C HamanoAug 8, 2025
  8. Patrick SteinhardtAug 12, 2025
  9. Junio C HamanoAug 28, 2025
  10. Junio C HamanoSep 2, 2025
  11. Toon ClaesSep 3, 2025
  12. Junio C HamanoSep 3, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.