]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc lint: Perl "strict" and "warnings" in lint-gitlink.perl
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 9 Apr 2021 15:02:46 +0000 (17:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 11 Apr 2021 06:36:34 +0000 (23:36 -0700)
Amend this script added in ab81411ced (ci: validate "linkgit:" in
documentation, 2016-05-04) to pass under "use strict", and add a "use
warnings" for good measure.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/lint-gitlink.perl

index 476cc30b837ecfb25a82406dd0859d04a00c1190..35230875c248b4c43fad943404167d4a75ddd1b2 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/perl
 
+use strict;
+use warnings;
 use File::Find;
 use Getopt::Long;
 
@@ -45,7 +47,7 @@ sub lint {
                                report($where, $target, "no such source");
                                next;
                        }
-                       $real_section = grab_section($page);
+                       my $real_section = grab_section($page);
                        if ($real_section != $section) {
                                report($where, $target,
                                        "wrong section (should be $real_section)");