Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summary at the end #169

Open
honzajavorek opened this issue Nov 12, 2019 · 7 comments
Open

Summary at the end #169

honzajavorek opened this issue Nov 12, 2019 · 7 comments

Comments

@honzajavorek
Copy link

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.

@pavelloz
Copy link

pavelloz commented Dec 21, 2019

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).

@idvorkin
Copy link

This impacts me as well, would love a summary at the end via command line.

@josephkerkhof
Copy link

I too would love a summary at the end via CLI.

@pavelloz
Copy link

pavelloz commented Mar 4, 2020

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 ;-)

@stevenvachon
Copy link
Owner

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.

@kokarn
Copy link

kokarn commented Sep 29, 2020

I would also like to get a summary at the end from the CLI, would be very useful.

PS: Looking forward to 0.8

@chadoh
Copy link

chadoh commented Oct 18, 2020

Addressed by #148. Also, #137 helps with this use-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants