[PATCH v2 3/7] doc lint: Perl "strict" and "warnings" in lint-gitlink.perl
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 9, 2021, 15:02 UTC
- Message-ID
- <patch-3.7-29545543bd-20210409T145728Z-avarab@gmail.com>
- In-Reply-To
- <cover-0.7-0000000000-20210409T145728Z-avarab@gmail.com>
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> --- Documentation/lint-gitlink.perl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
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)");
-- 2.31.1.622.g1b8cc22e65