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

fix: make --quiet flag only output errors #230

Merged
merged 2 commits into from
Mar 9, 2023
Merged

Conversation

tcrasset
Copy link
Contributor

Closes issue #223

Before

$ ./markdown-link-check test/* --quiet

FILE: test/file.md

FILE: test/hash-links.md
  [✖] #potato
  [✖] #tomato

  4 links checked.

  ERROR: 2 dead links found!
  [✖] #potato → Status: 404
  [✖] #tomato → Status: 404

FILE: test/hello.jpg

  0 links checked.

FILE: test/local-file.md

FILE: test/markdown-link-check.test.js

  0 links checked.

FILE: test/sample.md

FILE: test/special-replacements.md

After this change

$ ./markdown-link-check test/* --quiet

  ERROR: 2 dead links found in test/hash-links.md!
  [✖] #potato → Status: 404
  [✖] #tomato → Status: 404

On a file without broken links, it doesn't print anything:

Before

$ ./markdown-link-check test/file.md --quiet

FILE: test/file.md

After

$ ./markdown-link-check test/file.md --quiet
$

@tcort tcort merged commit dda2072 into tcort:master Mar 9, 2023
@tcort tcort mentioned this pull request Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants