You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @edsnowden, thanks for this report, and for your code and logs which made it straightforward to understand the issue and reproduce the behaviour. Also, that is a very pleasant amount of memory.
For HTML_CodeSniffer: I'm reasonably confident this is the currently intended behaviour of options.rules, going by the name of its non-obvious CLI counterpart, --add-rule, and by this test's name. I agree that rules is not a very descriptive name though, if I'm understanding this correctly, so maybe we should improve how we explain their equivalence.
For axe: --add-rule and options.rules are currently documented as being only for HTML_CodeSniffer, but I think we use this property internally for a different purpose for axe, where the intended behaviour appears to be 'set' rather than 'add', according to the name of the test I just linked, but I'm actually seeing the 'add' behaviour locally for axe too.
Are you comfortable with this behaviour, with the understanding it represents addition rather than replacement? Some other changes we could make:
(breaking) simply rename rules to be clearer; probably not a good idea since it would inconvenience current users of the property
(minor) same as (1), but also leave rules (now an alias for that new property) in place
(minor) explain this better in our documentation, whether in code or markdown. When you first learned about options.rules, where were you looking? We could try to clarify this to readers there
This is surely a misunderstanding or error on my part, but as far as I can tell the 'rules' option is checked but ignored.
Expected behaviour
When a list of rules is given in the rules option, only those rules are checked for/reported.
Actual behaviour
Specified rules must be valid, but appear to have no effect.
Steps to reproduce
Install node and pa11y
Create a file bug.js:
Run with
Observe the output is the same whether the rules are specified or not, and the errors do not relate to the specified rule:
Environment
The text was updated successfully, but these errors were encountered: