doc lint: check that synopsis manpages have synopsis inlines
When switching manpages to the synopsis style, the description lists of options need to be switched to inline synopsis for proper formatting. This is done by enclosing the option name in double backticks, e.g. `--option`. 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:
committed by
Junio C Hamano
parent
93203872d7
commit
84f3d6e11e
@@ -21,6 +21,12 @@ while (my $line = <>) {
|
||||
if ($line =~ /^`?--\[no-\][a-z0-9-]+.*(::|;;)$/) {
|
||||
report($line, "definition list item with a `--[no-]` parameter");
|
||||
}
|
||||
if ($line =~ /^\[synopsis\]$/) {
|
||||
$synopsis_style = 1;
|
||||
}
|
||||
if (($line =~ /^(-[-a-z].*|<[-a-z0-9]+>(\.{3})?)(::|;;)$/) && ($synopsis_style)) {
|
||||
report($line, "synopsis style and definition list item not backquoted");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user