From: Ævar Arnfjörð Bjarmason Date: Fri, 9 Apr 2021 15:02:46 +0000 (+0200) Subject: doc lint: Perl "strict" and "warnings" in lint-gitlink.perl X-Git-Tag: v2.32.0-rc0~41^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3951eeb6d981cf9b9109c905d773c978e6de3f0d;p=thirdparty%2Fgit.git doc lint: Perl "strict" and "warnings" in lint-gitlink.perl 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 Signed-off-by: Junio C Hamano --- diff --git a/Documentation/lint-gitlink.perl b/Documentation/lint-gitlink.perl index 476cc30b83..35230875c2 100755 --- a/Documentation/lint-gitlink.perl +++ b/Documentation/lint-gitlink.perl @@ -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)");