From 03a353bb9759a1c775ba70f1e9ee865fc38291c2 Mon Sep 17 00:00:00 2001 From: Jean-Noël Avila Date: Mon, 11 Aug 2025 20:53:18 +0000 Subject: doc: check for absence of the form --[no-]parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For better searchability, this commit adds a check to ensure that parameters expressed in the form of `--[no-]parameter` are not used in the documentation. In the place of such parameters, the documentation should list two separate parameters: `--parameter` and `--no-parameter`. Signed-off-by: Jean-Noël Avila Signed-off-by: Junio C Hamano --- Documentation/lint-documentation-style.perl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Documentation/lint-documentation-style.perl') diff --git a/Documentation/lint-documentation-style.perl b/Documentation/lint-documentation-style.perl index 1f35a6a116..11321a151b 100755 --- a/Documentation/lint-documentation-style.perl +++ b/Documentation/lint-documentation-style.perl @@ -18,6 +18,9 @@ sub report { report($line, "multiple parameters in a definition list item"); } + if ($line =~ /^`?--\[no-\][a-z0-9-]+.*(::|;;)$/) { + report($line, "definition list item with a `--[no-]` parameter"); + } } -- cgit 1.2.3-korg