Thread (1 message) 1 message, 1 author, 2021-03-28

Re: [PATCH 3/5] doc lint: Perl "strict" and "warnings" in lint-gitlink.perl

From: Junio C Hamano <hidden>
Date: 2021-03-28 06:29:11

Ævar Arnfjörð Bjarmason  [off-list ref] writes:
quoted hunk
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 <redacted>
---
 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 476cc30b837..35230875c24 100755
--- a/Documentation/lint-gitlink.perl
+++ b/Documentation/lint-gitlink.perl
@@ -1,5 +1,7 @@
 #!/usr/bin/perl
 
+use strict;
+use warnings;
Yes!  Thanks.
quoted hunk
 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)");
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help