anishathalye / proof-html

A GitHub Action to validate HTML, check links, and more ✅
MIT License
58 stars 21 forks source link

Ignoring files #13

Closed WispySparks closed 1 week ago

WispySparks commented 2 weeks ago

Is it possible to either ignore a list of files or ignore files whose names match a regex?

anishathalye commented 2 weeks ago

proof-html currently uses the Nu Validator to check HTML, and htmlproofer to check links.

htmlproofer supports ignoring files by regex: see the ignore_files configuration. proof-html doesn't support this option, but this would be straightforward to add.

Nu Validator, as far as I can tell, doesn't have a convenient way to specify files to ignore (https://validator.github.io/validator/#options).

What's your use case? There might be a simple workaround, e.g., running find ... -delete before running proof-html, if you're doing this in CI and don't need the files that are to be "ignored" (in this case, deleted before proof-html runs).

WispySparks commented 1 week ago

Thanks for the response, I had some old bootstrap CSS files I didn't want to fix but since that would be under the Nu Validator it looks like I'll have to fix the issues.

anishathalye commented 1 week ago

You can also ignore CSS altogether, I've done that in one of my projects where I was too lazy to fix the CSS.