From: Daniel Stenberg Date: Wed, 10 Dec 2025 07:45:34 +0000 (+0100) Subject: mdlinkcheck: add --dry-run to only show all found URLs X-Git-Tag: rc-8_18_0-2~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26d766596e12e0ca9b00422789a8b6afbc0c7fe8;p=thirdparty%2Fcurl.git mdlinkcheck: add --dry-run to only show all found URLs - remove the debug tracing leftovers from d9d2e339ced3fa02 that made exit unconditonally Closes #19914 --- diff --git a/scripts/mdlinkcheck b/scripts/mdlinkcheck index f50d77527a..bd54d96fe2 100755 --- a/scripts/mdlinkcheck +++ b/scripts/mdlinkcheck @@ -84,6 +84,12 @@ my %whitelist = ( my %url; my %flink; +my $dry; +if(defined $ARGV[0] && $ARGV[0] eq "--dry-run") { + $dry = 1; + shift @ARGV; +} + # list all files to scan for links my @files=`git ls-files docs include lib scripts src`; @@ -207,10 +213,12 @@ for my $u (sort keys %whitelist) { } } -for my $u (sort keys %url) { - print "$u\n"; +if($dry) { + for my $u (sort keys %url) { + print "$u\n"; + } + exit; } -exit; my $error; my @errlist;