From 9a5c861b41e1791a4f0f9b9fc9a79da08b5ba6a4 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 11 Jul 2025 14:54:10 +0200 Subject: [PATCH] mdlinkcheck: enable warnings, fix them fix a typo that made this error never detected: ``` %s ERROR links to missing URL %s ``` --- scripts/mdlinkcheck | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/mdlinkcheck b/scripts/mdlinkcheck index 33fcac9de6..5c1f0569d4 100755 --- a/scripts/mdlinkcheck +++ b/scripts/mdlinkcheck @@ -23,6 +23,9 @@ # ########################################################################### +use strict; +use warnings; + my %whitelist = ( 'https://curl.se/' => 1, 'https://curl.se/changes.html' => 1, @@ -70,6 +73,9 @@ my %whitelist = ( ); +my %url; +my %flink; + # list all .md files in the repo my @files=`git ls-files '**.md'`; @@ -146,7 +152,7 @@ for my $u (sort keys %url) { my $r = checkurl($u); if($r) { - for my $f (split(/ /, $url{$l})) { + for my $f (split(/ /, $url{$u})) { printf "%s ERROR links to missing URL %s\n", $f, $u; $error++; }