🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #4144

[PATCH v5 0/2] guides: keep Documentation/Makefile and command-list.txt in sync

#4144
From: Tuomas Ahola
Date: Mon, 30 Nov 2026 16:22
172 lines
15846 bytes
A new linter test has been added to Documentation/lint-manpages.sh
to ensure that all non-command manual pages (concept guides and
interface manuals) listed in Documentation/Makefile are present in
command-list.txt.

Changes in v5:

* [1/2]: Changed commit log message.
* [2/2]: Refactored not to use extract_variable()

Changes in v4:

* [1/2]: Rebased to 0ffa3e35c7 (The 15th batch, 2026-11-04)
* [2/2]: Changed the signature of extract_variable()
  	 to extract_variable <Makefile> <variable>...

Changes in v3:

* [2/2]:
   - Exempt obsoleted gittutorial-2(7).
   - Even more defensive quotation.

Changes in v2:

* [1/2]: Use command-list.txt as the area identifier.
* [2/2]: Protect variables against whitespace breakage per review comment.

Tuomas Ahola (2):
  command-list.txt: add gitformat-loose(5) and gitpacking(7)
  lint-docs: ensure command-list.txt lists all guides

 Documentation/Makefile         | 3 ++-
 Documentation/lint-manpages.sh | 5 ++++-
 command-list.txt               | 2 ++
 3 files changed, 8 insertions(+), 2 deletions(-)

Intervall-diff mot v4:
1:  a21c0e2bf7 ! 1:  6ebae33b99 command-list.txt: add gitformat-loose(5) and gitpacking(7)
    @@ Metadata
      ## Commit message ##
         command-list.txt: add gitformat-loose(5) and gitpacking(7)
     
    -    Three manpages from sections 5 and 7 are not featured in
    +    Four manpages from sections 5 and 7 are not featured in
         command-list.txt as concept guides or interface manuals.
     
    -    As easy fixes, add gitformat-loose(5) to 'developerinterfaces'
    -    and make gitpacking(7) a 'guide'.
    +    Two of those omissions are intentional: gittutorial(7) is a mere stub
    +    since bfae357a46 (doc: remove gittutorial-2, 2026-10-26), and listing
    +    gitweb.conf(5) was explicitly decided against in [1].
     
    -    That leaves only gitweb.conf(5) which could be added to
    -    'userinterfaces'.  However, the manual would then appear
    -    as "web.conf" in `git help -a` which is just confusing.
    -    So, perhaps we are better off by leaving it out.
    +    The other two cases, however, are genuine documentation bugs.  Fix the
    +    gaps by adding gitformat-loose(5) to 'developerinterfaces', and by
    +    marking gitpacking(7) as a 'guide'.
    +
    +    Links:
    +      1. <pull.691.v3.git.1596590347.gitgitgadget@gmail.com>
     
         Signed-off-by: Tuomas Ahola <taahol@utu.fi>
     
    +
    + ## Notes ##
    +    Command:
    +
    +      for i in Documentation/git[^-]*.adoc
    +      do
    +      	grep -q ^$(basename --suffix=.adoc $i)[\ ] command-list.txt || head -n 1 $i
    +      done
    +
    +    Output:
    +
    +      gitformat-loose(5)
    +      gitpacking(7)
    +      gittutorial-2(7)
    +      gitweb.conf(5)
    +
      ## command-list.txt ##
     @@ command-list.txt: gitformat-bundle                        developerinterfaces
      gitformat-chunk                         developerinterfaces
2:  4e41401866 ! 2:  fcc9260153 lint-docs: ensure command-list.txt lists all guides
    @@ Commit message
         Documentation/Makefile reminding developers to add new guides also to
         command-list.txt.  However, there is no linter script to enforce that.
     
    -    Adapt Documentation/lint-manpages.sh to fill that role.  Extract
    -    MAN5_TXT and MAN7_TXT from the docs Makefile and check command-list.txt
    -    against them.  Exempt gitweb.conf(5) and gittutorial-2(7) from the
    -    new linter routine as deliberate omissions.
    +    Adapt Documentation/lint-manpages.sh to fill that role, and let it
    +    scrutinize command-list.txt against MAN5_TXT and MAN7_TXT.  Exempt
    +    gitweb.conf(5) and gittutorial-2(7) from the new linter routine as
    +    deliberate omissions.
    +
    +    While at it, mark lint-docs-manpages as a .PHONY target.
     
         Signed-off-by: Tuomas Ahola <taahol@utu.fi>
     
    - ## Documentation/lint-manpages.sh ##
    -@@
    - #!/bin/sh
    + ## Documentation/Makefile ##
    +@@ Documentation/Makefile: $(LINT_DOCS_DOC_STYLE): .build/lint-docs/doc-style/%.ok: %.adoc
    + .PHONY: lint-docs-doc-style
    + lint-docs-doc-style: $(LINT_DOCS_DOC_STYLE)
      
    - extract_variable () {
    --	(
    --		cat ../Makefile
    --		cat <<EOF
    -+	file="$1"
    -+	directory="$(dirname "$file")"
    -+	shift
    -+	for i in "$@"
    -+	do
    -+		(
    -+			cat "$file"
    -+			cat <<EOF
    - print_variable:
    - 	@\$(foreach b,\$($1),echo XXX \$(b:\$X=) YYY;)
    - EOF
    --	) |
    --	make -C .. -f - print_variable 2>/dev/null |
    --	sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p'
    -+		) |
    -+		make -C "$directory" -f - print_variable 2>/dev/null |
    -+		sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p'
    -+	done
    - }
    ++.PHONY: lint-docs-manpages
    + lint-docs-manpages:
    +-	$(QUIET_GEN)./lint-manpages.sh
    ++	$(QUIET_GEN)./lint-manpages.sh $(patsubst %.adoc,%,$(MAN5_TXT) $(MAN7_TXT))
      
    + .PHONY: lint-docs-meson
    + lint-docs-meson:
    +
    + ## Documentation/lint-manpages.sh ##
    +@@ Documentation/lint-manpages.sh: EOF
      check_missing_docs () (
      	ret=0
      
    @@ Documentation/lint-manpages.sh: check_missing_docs () (
      
      		if ! test -f "$v.adoc"
     @@ Documentation/lint-manpages.sh: check_extraneous_docs () {
    - 	)
    - }
    - 
    --BUILT_INS="$(extract_variable BUILT_INS)"
    --ALL_COMMANDS="$(extract_variable ALL_COMMANDS)"
    --EXCLUDED_PROGRAMS="$(extract_variable EXCLUDED_PROGRAMS)"
    -+BUILT_INS="$(extract_variable ../Makefile BUILT_INS)"
    -+ALL_COMMANDS="$(extract_variable ../Makefile ALL_COMMANDS)"
    -+EXCLUDED_PROGRAMS="$(extract_variable ../Makefile EXCLUDED_PROGRAMS)"
    -+MAN_GUIDES="$(extract_variable Makefile MAN5_TXT MAN7_TXT | sed -e 's/\.adoc//')"
    + BUILT_INS="$(extract_variable BUILT_INS)"
    + ALL_COMMANDS="$(extract_variable ALL_COMMANDS)"
    + EXCLUDED_PROGRAMS="$(extract_variable EXCLUDED_PROGRAMS)"
    ++MAN_GUIDES="$@"
      
      findings=$(
      	if ! check_missing_docs

base-commit: 0ffa3e35c7c82ab8d0de226149fb03b3f7674d05
-- 
ta/command-list-guides-sync-lint
Technical Details
Message-ID: <20261130162257.24770-1-taahol@utu.fi>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-76705-linux-kernel-git=dewy.ru
References: <20260909052501.8448-1-taahol@utu.fi>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-76705-linux-kernel-git=dewy.ru
From: taahol@utu.fi (Tuomas Ahola)
Newsgroups: linux.kernel.git
Subject: [PATCH v5 0/2] guides: keep Documentation/Makefile and command-list.txt in sync
Date: Mon, 30 Nov 2026 18:22:55 +0200
Organization: Usenet Network
Message-ID: <20261130162257.24770-1-taahol@utu.fi>
References: <20260909052501.8448-1-taahol@utu.fi>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1467715"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:NgFi8Hnv7Z1D1JyRZ4EJbSCccSw= sha256:Lhyxea62ktPY7H47qk+q2BXy42wlzdWFJD4k0Lr7W1k=
	sha1:pPPtdQGVF2zDHhylOB2tkSegRyU= sha256:4VvKZApMyWhJpdJXfUgV34/razUTLr2i0szcweL8AuU=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 75E6A125FF3; Mon, 30 Nov 2026 19:23:35 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.95
X-Spam-Status: No, score=-1.95 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=utu.fi
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id hW7dLgrIxx6w;
	Mon, 30 Nov 2026 19:23:32 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-76705-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=utu.fi
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 19F3E125FF1; Mon, 30 Nov 2026 19:23:23 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 6E33C2D859; Mon, 30 Nov 2026 16:23:19 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail;
	t=1796055798;
	b=CosbugX0gcNq8iQb00JLMOnNauERyohNVHQknbj5pnDbYcJvsZdJjkm1Sz4sH9rWa0eT
	 x95CAikbEwJMhQVEWsFsRhYDNllaI8RL0a++kCs9WcV2Y/Zy8NakL0qrbzFl0idPKzftF
	 3+hcHGeC/GpRdhkewEPA8CTO54Lu4F2IO07oZYMo5IZ+czPGYgliFTqD0DZXGR1K957B2
	 8qvzSbtg81Rl+ZWbqkIZ99rwks3j/xCLuoJhZfmwsmEdHAWz1kXRitMV61TExefEBbGbT
	 5HN9Wp/LatoiY3kLspSXiuHHV3iSh2vW/n+KnYX/OR8ZZGgQ1TzDxGQI9c1ClxOO6lg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796055798;
	h=X-Original-To:Received:DMARC-Filter:Received:Received:Received:
	 Received:From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To:
	 References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding:Content-Type:X-ClientProxiedBy:
	 X-FEAS-BEC-Info:X-FEAS-Client-IP:X-FE-Last-Public-Client-IP:
	 X-FE-Policy-ID:X-FE-Hostname:DKIM-Signature;
	bh=VHyXRQh8sxdepnobLunGv8HRMUQgPNtVe+9cTKhA7bE=;
	b=OwQM1ZFnc1C5B/yeCG3BxVMftvxNtRN5RYeTFhi0JZN78S9XL/Lim7OjAC8S+f5Tu9gE
	 zXKUfXkrnAEzCovvdc0hk2ALV4/B8fxmuQZ0c+S/0eSnlXvjr/EGN1nWk1RJnX8qZt5vR
	 ZWhKYO4qpjxDlZ+1Q64O/sSsbwsZJ/hdSG1leauqLq6YjBrFsQMEgDSwadGYgVO2rPfvg
	 l4JdsqenApuFSZ9xw11KxhTvLtxXaPREWTxp0XkadhQXZxDCnkSvo+boyuaXHEfVUsDIg
	 LIBsxYHVOm/SODpkZ7ahCWBPQO45xyq+0b/dB6AhODyjcMzoKA93lEybRLOmejufMqw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=utu.fi header.i=@utu.fi header.a=rsa-sha256 header.s=out-utu-v3 header.b=O27jSGMj;
	dmarc=pass header.from=utu.fi;
	spf=pass smtp.mailfrom=utu.fi;
	arc=fail smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C1BF606A338;
	Mon, 30 Nov 2026 16:23:18 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=utu.fi header.i=@utu.fi header.a=rsa-sha256 header.s=out-utu-v3 header.b=O27jSGMj
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=130.232.247.4
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796055797;
	b=NFGge+PhxNQO81fPti4Sj6KtOD8OtzoKDraEBHjVktZgtnummeRlBu6rWjtrJv/KHPVO
	 WiYhirOL2pETg3Hk5T/d6/QCUU2QE40HYBjYUThi7xuX5JbUpPQZaCqvAEKTjcn3Qdi4F
	 RUd9U0AbYoSbmS6LzOZ7M32ZuiDATwSci9Mc8BbmtGE0qsVXeleRUWBzcmePtIPoP08OP
	 BJq1jPIt/yXodxUxHol3fwHdxB+/r6U1KcZwV9oLsVtmBxCiUwNZSADVRXm66qC3SBgsw
	 NG5BVmu9XM2fSbvKZa68sjkPBk3cfX8AmgBmZE1jf6cmtAcf3rRJYVTzSvb1fJMHxkQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796055797;
	h=DMARC-Filter:Received:Received:Received:Received:From:To:CC:Subject:
	 Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding:Content-Type:X-Originating-IP:
	 X-ClientProxiedBy:X-FEAS-BEC-Info:X-FEAS-Client-IP:
	 X-FE-Last-Public-Client-IP:X-FE-Policy-ID:X-FE-Hostname:
	 DKIM-Signature;
	bh=VHyXRQh8sxdepnobLunGv8HRMUQgPNtVe+9cTKhA7bE=;
	b=IorK3NIvMNeU7S3XXGp18U/wWze3pnsxQjNsnwDKsRfdKimqZvSUy2HqKENrQWTHFhuo
	 7FP52AIEg/q54GAwfX+U75KrUANIK5VqejRUtXVm2Vr16aSiT7ml/IrzGMlMNJInAYP4o
	 EwSGDuyQhR1+ylMXAv1OUW4MyHoyL9jaGJBuVQLddjoYcX5+Qf9M/qvt0T+GIvIwJ6nD4
	 lEjosd/EQhzaPxIB+e1Aa3k94mYxQjxXKgZ3NdhsNzf7ogRgjxq/SBxvrT9Kj6ExJTzt5
	 mEvFvyTIb04IBnTFxxD16oF5sZZ7rIzmWRr+ziw0izkIwN8avC24fljx+ZO0eC947cg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=utu.fi;
	spf=pass smtp.mailfrom=utu.fi;
	dkim=pass header.d=utu.fi header.i=@utu.fi header.a=rsa-sha256 header.s=out-utu-v3 header.b=O27jSGMj;
	arc=none smtp.remote-ip=130.232.247.4
X-Received: from fortymile.utu.fi (fortymile.utu.fi [130.232.247.4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1534B606A325
	for <git@vger.kernel.org>; Mon, 30 Nov 2026 16:23:15 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1534B606A325
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=utu.fi
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=utu.fi
X-Received: from smtp-04.utu.fi (smtp-04.utu.fi [130.232.207.47])
	by fortymile.utu.fi  with ESMTPS id 6AUGMxpF020019-6AUGMxpH020019
	(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO);
	Mon, 30 Nov 2026 18:22:59 +0200
X-Received: from ex19-06.utu.fi ([130.232.247.46])
	by smtp-04.utu.fi with esmtps  (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
	(Exim 4.95)
	(envelope-from <taahol@utu.fi>)
	id 1xY49b-0000Us-Bj;
	Mon, 30 Nov 2026 18:22:59 +0200
X-Received: from localhost (86.50.95.90) by ex19-06.utu.fi (130.232.247.46) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Mon, 30 Nov
 2026 18:22:59 +0200
X-Received: from localhost (localhost [local])
	by localhost (OpenSMTPD) with ESMTPA id 51889fab;
	Mon, 30 Nov 2026 16:22:58 +0000 (UTC)
X-CC: Junio C Hamano <gitster@pobox.com>, Julia Evans <julia@jvns.ca>,
	Kristoffer Haugsbakk <code@khaugsbakk.name>, Tuomas Ahola <taahol@utu.fi>
X-Mailer: git-send-email 2.30.2
X-In-Reply-To: <20260909052501.8448-1-taahol@utu.fi>
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-ClientProxiedBy: ex19-06.utu.fi (130.232.247.46) To ex19-06.utu.fi
 (130.232.247.46)
X-FEAS-BEC-Info: WlpIGw0aAQkEARIJHAEHBlJSCRoLAAEeDUhZUEhYSFhIWkhZXkguLT4lWFxYWFhYWFBeUVxfSFhISFlbSBwJCQAHBCgdHB1GDgFIWUhZX0gPARwbHA0aKBgHCgcQRgsH
 BUhYSFpIWVxIWVtYRlpbWkZaWF9GXF9IUEhYSFhIXEhYSFhIWEhaWEgLBwwNKAMACR0PGwoJAwNGBgkFDUhYSFlRSA8BHCgeDw0aRgMNGgYNBEYHGg9IWEhZX0gPARwb
 HA0aKBgHCgcQRgsHBUhYSFlbSAIdBAEJKAIeBhtGCwlIWA==
X-FEAS-Client-IP: 130.232.207.47
X-FE-Last-Public-Client-IP: 130.232.207.47
X-FE-Policy-ID: 3:5:2:SYSTEM
X-FE-Hostname: fortymile.utu.fi
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; d=utu.fi; s=out-utu-v3; c=relaxed/relaxed;
 h=from:to:cc:subject:date:message-id:references:mime-version:content-type;
 bh=VHyXRQh8sxdepnobLunGv8HRMUQgPNtVe+9cTKhA7bE=;
 b=O27jSGMjQ8XNatd5R63cht3gHLjanwk303KYaXBgszBVRT7ifMS6PbGu4KEy2ZN/yVkyRITpZRHU
	ra2XpJbRrzAIdIgMK6nffd6QDB+EZpXByGXoS7cUvlJzYTHkKs0mkag2iDoXfuOKrAaKnL69pLdL
	DI0/7JEjZtNOGE9N5dgxLwXQReh9t65vDQ75mdro7Zl+wCoOyj4TtO41V7AA8NUyxnCPKrC74nit
	zdGKHPwGpJO/h0FLZLap3GQ/C7Vrx9bUMAAkfA6VC6BodtC1wEON29FYwq2b23A/8tnKbPECaZCv
	tS2bqbVnmDVDIZIKxjZ7/Bn84fzNm/9kZsN4EA==