Skip to content

Commit 4e8623b

Browse files
fix: only report non-skipped links in total (#36)
1 parent b795e2d commit 4e8623b

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

dist/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32762,7 +32762,8 @@ async function main () {
3276232762
});
3276332763

3276432764
const result = await checker.check(options);
32765-
core.info(`Scanned total of ${result.links.length} links!`);
32765+
const nonSkippedLinks = result.links.filter(x => x.state !== 'SKIPPED');
32766+
core.info(`Scanned total of ${nonSkippedLinks.length} links!`);
3276632767
if (!result.passed) {
3276732768
const brokenLinks = result.links.filter(x => x.state === 'BROKEN');
3276832769
let failureOutput = `Detected ${brokenLinks.length} broken links.`;

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ async function main () {
3636
});
3737

3838
const result = await checker.check(options);
39-
core.info(`Scanned total of ${result.links.length} links!`);
39+
const nonSkippedLinks = result.links.filter(x => x.state !== 'SKIPPED');
40+
core.info(`Scanned total of ${nonSkippedLinks.length} links!`);
4041
if (!result.passed) {
4142
const brokenLinks = result.links.filter(x => x.state === 'BROKEN');
4243
let failureOutput = `Detected ${brokenLinks.length} broken links.`;

0 commit comments

Comments
 (0)