← Commit list

26d766596e

Daniel Stenberg
Daniel Stenberg
2025-12-10
SUCCESS Duration: 205s

Subject

mdlinkcheck: add --dry-run to only show all found URLs

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

scripts/mdlinkcheck+11 -3
@@ -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;