For simplifying automated translation of the documentation, it is better to only present one term in each entry of a description list of options. This is because most of these terms can automatically be marked as notranslatable. Also, due to portability issues, the script generate-configlist.sh can no longer insert newlines in the output. However, the result is that it no longer correctly handles multiple terms in a single entry of definition lists. As a result, we now check that these entries do not exist in the documentation. Reviewed-by: Collin Funk <collin.funk1@gmail.com> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
25 lines
386 B
Perl
Executable File
25 lines
386 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
my $exit_code = 0;
|
|
sub report {
|
|
my ($line, $msg) = @_;
|
|
chomp $line;
|
|
print STDERR "$ARGV:$.: '$line' $msg\n";
|
|
$exit_code = 1;
|
|
}
|
|
|
|
my $synopsis_style = 0;
|
|
|
|
while (my $line = <>) {
|
|
if ($line =~ /^[ \t]*`?[-a-z0-9.]+`?(, `?[-a-z0-9.]+`?)+(::|;;)$/) {
|
|
|
|
report($line, "multiple parameters in a definition list item");
|
|
}
|
|
}
|
|
|
|
|
|
exit $exit_code;
|