Skip to content

Pass options through to rule verification#695

Open
hrobertking wants to merge 2 commits into
CSSLint:masterfrom
hrobertking:core
Open

Pass options through to rule verification#695
hrobertking wants to merge 2 commits into
CSSLint:masterfrom
hrobertking:core

Conversation

@hrobertking

Copy link
Copy Markdown
  • Enable the verify API to accept an options object
  • Pass the options object through to the verify API from the command line
  • Fix a defect in the reporter than sets the 'evidence' property to undefined instead of empty string
@frvge

frvge commented May 23, 2017

Copy link
Copy Markdown
Contributor

@hrobertking , can you add an example test case where the options parameter is used inside a rule to change behavior?

@hrobertking

Copy link
Copy Markdown
Author

@frvge , I'm unclear regarding what is needed here.

My intention is to (in a different PR) modify the rules-max rule to allow a different number to be used for the maximum number of rules, and allow more configurable rules to be written. This change makes passing those configurations into rules (like rules-max) possible. You can see a specific example of how that will work on my fork at hrobertking@e58fed3 where I've modified rules-max to accept a number rather than just using 500.

If you're looking for a test, I'm not sure I could conceive of one that would work within the existing framework, because it would require a rule to be modified to add the options parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants