Open honzajavorek opened 5 years ago
This is how i handle summary report (its on jenkins, thats why im saving it a file, jenkins cats it to a slack message later):
end: function() {
console.log('');
if (customData.failed.length === 0) {
const summary = `All links are working correctly at ${siteUrl}`;
fs.writeFileSync('test-summary.txt', summary); // summary will be forwarded to slack by jenkins
process.exit(0);
} else {
const summary = `Correct: ${customData.succeeded.length} \nBroken: ${customData.failed.length}`;
fs.writeFileSync('test-summary.txt', summary); // summary will be forwarded to slack by jenkins
process.exit(1);
}
}
And of course in link
method, you can echo whatever you want into the CI console (for history/skipping comparisons purposes).
This impacts me as well, would love a summary at the end via command line.
I too would love a summary at the end via CLI.
I dont know if you guys noticed, but last code changing commit here was around 4 years ago, so my advice would be to improvise instead of waiting ;-)
I dont know if you guys noticed, but last code changing commit here was around 4 years ago, so my advice would be to improvise instead of waiting ;-)
Check the other branches.
I would also like to get a summary at the end from the CLI, would be very useful.
PS: Looking forward to 0.8
Addressed by #148. Also, #137 helps with this use-case.
Is your feature request related to a problem? Please describe. I'm running the link checker in the CI and when the CI job fails, I want to quickly see what's wrong. Currently that means scanning the whole output for
-- BROKEN --
, because I like to keep--verbose
history of which linkes worked before or whether it was skipped for some reason.Describe the solution you'd like There could be a summary of all broken links at the end of the output.
Describe alternatives you've considered Maybe there is a combination of options which would work for me? Perhaps removing
--verbose
would solve it all?Additional context I'm mostly thinking out loud here whether my idea would be the best solution to my problem, whether there are other people wanting this, and if you'd like this feature in the project. If it's reasonably easy to add, I could try to send a PR.