Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/Documentation/lint-documentation-style.perl # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / Documentation / lint-documentation-style.perl` 33 lines ยท 732 bytes Raw Blame History 1 #!/usr/bin/perl 2 3 use strict; 4 use warnings; 5 6 my $exit_code = 0; 7 sub report { 8 my ($line, $msg) = @_; 9 chomp $line; 10 print STDERR "$ARGV:$.: '$line' $msg\n"; 11 $exit_code = 1; 12 } 13 14 my $synopsis_style = 0; 15 16 while (my $line = <>) { 17 if ($line =~ /^[ \t]*`?[-a-z0-9.]+`?(, `?[-a-z0-9.]+`?)+(::|;;)$/) { 18 19 report($line, "multiple parameters in a definition list item"); 20 } 21 if ($line =~ /^`?--\[no-\][a-z0-9-]+.*(::|;;)$/) { 22 report($line, "definition list item with a `--[no-]` parameter"); 23 } 24 if ($line =~ /^\[synopsis\]$/) { 25 $synopsis_style = 1; 26 } 27 if (($line =~ /^(-[-a-z].*|<[-a-z0-9]+>(\.{3})?)(::|;;)$/) && ($synopsis_style)) { 28 report($line, "synopsis style and definition list item not backquoted"); 29 } 30 } 31 32 33 exit $exit_code;