aboutsummaryrefslogtreecommitdiff
path: root/Documentation/lint-gitlink.perl
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/lint-gitlink.perl')
-rwxr-xr-xDocumentation/lint-gitlink.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/lint-gitlink.perl b/Documentation/lint-gitlink.perl
index f183a18df2..a92e887b4c 100755
--- a/Documentation/lint-gitlink.perl
+++ b/Documentation/lint-gitlink.perl
@@ -41,10 +41,11 @@ die "BUG: No list of valid linkgit:* files given" unless @ARGV;
@ARGV = $to_check;
while (<>) {
my $line = $_;
+ next if $line =~ /^\s*(ifn?def|endif)::/;
while ($line =~ m/(.{,8})((git[-a-z]+|scalar)\[(\d)*\])/g) {
my $pos = pos $line;
my ($macro, $target, $page, $section) = ($1, $2, $3, $4);
- if ( $macro ne "linkgit:" && $macro !~ "ifn?def::" && $macro ne "endif::" ) {
+ if ( $macro ne "linkgit:" ) {
report($pos, $line, $target, "linkgit: macro expected");
}
}