Skip to content

Commit dfda276

Browse files
committed
update formatting
1 parent cf20fb1 commit dfda276

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

script/check-english-links.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,14 @@ async function main () {
7676
const skippedLinks = result.links.filter(x => x.state === 'SKIPPED')
7777
const brokenLinks = result.links.filter(x => x.state === 'BROKEN')
7878

79-
console.log(dedent`
80-
${brokenLinks.length} broken links found on docs.github.com
81-
82-
Link scan completed in ${endTime - startTime}ms
83-
Total links: ${result.links.length}
84-
Skipped links: ${skippedLinks.length}
85-
Broken links: ${brokenLinks.length}
86-
For more details see ${path.relative(process.cwd(), logFile)}
87-
`)
79+
console.log(`${brokenLinks.length} broken links found on docs.github.com\n`)
8880

8981
if (brokenLinks.length) {
90-
console.log('\n\n' + JSON.stringify(brokenLinks, null, 2))
82+
console.log('```')
83+
brokenLinks.forEach(brokenLinkObj => {
84+
console.log(JSON.stringify(brokenLinkObj, null, 2))
85+
})
86+
console.log('```')
9187
process.exit(1)
9288
}
9389

0 commit comments

Comments
 (0)