Skip to content

--error-sort flag hides error message output when specified #701

Description

@justwheel

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

  1. Run htmlproofer on an HTML directory with --error-sort ':path' or any other option (e.g. :desc, :status)
  2. Error messages is suppressed.

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/'

Running ["ScriptCheck", "LinkCheck", "ImageCheck", "HtmlCheck"] on ["exampleSite/public"] on *.html... 

Adding 0 links to the cache...
Removing 0 links from the cache...
Found 0 internal links in the cache...
Ran on 49 files!

- exampleSite/public/installation/configuration/index.html
  *  553:12: ERROR: Missing semicolon after character reference '&lt'.
        <b>&lt</b>
           ^ (line 553)
  *  557:17: ERROR: Missing semicolon after character reference '&gt'.
            <b> &gt</b>
                ^ (line 557)

HTML-Proofer found 2 failures!

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'

Running ["ImageCheck", "HtmlCheck", "ScriptCheck", "LinkCheck"] on ["exampleSite/public"] on *.html... 

Adding 0 links to the cache...
Removing 0 links from the cache...
Found 0 internal links in the cache...
Ran on 49 files!

HTML-Proofer found 2 failures!

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

  • Fedora Linux release 35 (Thirty Five)
  • ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]

HTML-Proofer Version

htmlproofer 3.19.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions