doc: check for absence of the form --[no-]parameter

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 <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jean-Noël Avila
2025-08-11 20:53:18 +00:00
committed by Junio C Hamano
parent ed26022094
commit 03a353bb97
36 changed files with 159 additions and 78 deletions

View File

@@ -18,6 +18,9 @@ while (my $line = <>) {
report($line, "multiple parameters in a definition list item");
}
if ($line =~ /^`?--\[no-\][a-z0-9-]+.*(::|;;)$/) {
report($line, "definition list item with a `--[no-]` parameter");
}
}