-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
--error-sort
flag hides error message output when specified
#701
Comments
-error-sort
flag hides error message output when specified--error-sort
flag hides error message output when specified
Thanks for the detailed report. Could I ask you to try the command with a new html-proofer, 4.0.0.rc3? |
@gjtorikian I'm giving it a go, but I guess a lot of flags were removed. Is |
It should now be
Ack, that's right, I got rid of it. The suggested method now is to create your own error reporter, which sorts errors in the whatever way you've defined. The docs are kind of bare, but here's an example of how HTMLProofer does this by default: https://github.com/gjtorikian/html-proofer/blob/85c7aa07cf9d9a0c5fd46c15daeec043856c0ccf/lib/html_proofer/reporter/cli.rb In essence, rather than html-proofer dictating how data should be presented, it sets up subclasses and objects for users to define their own custom behavior. Hope this helps! |
Summary
When the
--error-sort
flag is specified at runtime, all error messages are suppressed regardless of which option is chosen. Removing the flag shows the error message output.Steps to Reproduce
htmlproofer
on an HTML directory with--error-sort ':path'
or any other option (e.g.:desc
,:status
)A clear and concise description of what you expected to happen.
Show the details of the error messages. This behavior is the default if
--error-sort
is omitted.htmlproofer exampleSite/public --allow-hash-href --alt-ignore --checks-to-ignore '' --check-html --disable-external --empty-alt-ignore --http-status-ignore '0,999' --timeframe '6w' --url-ignore '/inventory-hugo-theme/'
What actually happened
htmlproofer exampleSite/public --allow-hash-href --alt-ignore --checks-to-ignore '' --check-html --disable-external --empty-alt-ignore --http-status-ignore '0,999' --timeframe '6w' --url-ignore '/inventory-hugo-theme/' --error-sort ':path'
Other information
This makes debugging failed CI jobs more difficult. This is related to CircleCI-Public/hugo-orb#51 and has caused me trouble in my own repositories where I use
htmlproofer
to verify HTML output.Operating System
HTML-Proofer Version
htmlproofer 3.19.3
The text was updated successfully, but these errors were encountered: