Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@dwightjack
This is a draft, but wanted to put it out to get your thoughts.
I'm not sure if GitHub will make this work, but I thought trying to PR my changes to your fork's branch could then carry over into your PR to
pa11y
.This includes the following updates:
fileName
property to write directly to a file.resolver
logic to accept the shorthandcli
andjson
and resolve the appropriate included reporters, which would allow them to be selected without having to include the local path. I included the specific resolved names to allow names down the line that did not match the shorthand. The other option I considered was updatingloader
to try to resolve in thelib/reporters/
folder first, but the login seemed overly complicated.I was planning to put in a test for multiple reporters, but ran out of time and wanted to get this much out there.
I did not address the
--json
CLI option at all, was hoping to head some input on that from thepa11y
team. My vote is still to just remove it for consistency, but if not rather than leaving the duplicate logic I'd propose setting the reporter tojson
if that option is selected, overriding--reporter
(another reason to just remove it).