You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(link-check): count broken links from the failure sections only
The broken-link count grepped the whole lychee report for '* [<digits>]',
which counts the wrong lines in both directions: every followed redirect is
reported as '* [200] <url>' and got counted as broken, while a request that
never produced an HTTP response is reported as '[ERROR]' or '[TIMEOUT]' and
was skipped entirely. Those non-numeric ones are DNS failures, TLS failures,
timeouts and missing local files, so a site whose links fail that way parsed
to zero.
Scope the scan to the 'Errors per input' and 'Timeouts per input' sections,
accept any bracketed status, and strip the '(at line:col)' span before the
autolink delimiters so the reported URLs are clean.
Verified against real lychee 0.23.0 output: on a report with one [ERROR] and
one followed redirect, the old expression returned 1 by counting the redirect
and missing the error, while this returns the error.
Closes#2080
0 commit comments