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
I started implementing a filtering feature in the rules command yesterday. For example, showing only enabled, disabled, the ones that only show warnings, and more.
When looking into the code, I initially thought of adding options to RulesOptions. But as RulesCommand accepts only one Argument at the moment, I think it would make sense one of the choices:
A - Keep using RulesCommand for both; if a rule identifier is passed, it always wins over the other options; otherwise, it will list all rules (and filter if filter-enabled is passed).
B - Create a new command, RuleCommand (Singular, not plural), that prints only the rule that relates to the passed identifier. And keep RulesCommand only for displaying multiple rules, according to the filtering options.
Both choices have their pros/cons, and I personally prefer A. Do you see any better way of doing this? I'll be happy to open a PR in the next few days according to the suggestions here.
The text was updated successfully, but these errors were encountered:
I started implementing a filtering feature in the rules command yesterday. For example, showing only enabled, disabled, the ones that only show warnings, and more.
When looking into the code, I initially thought of adding options to
RulesOptions
. But asRulesCommand
accepts only one Argument at the moment, I think it would make sense one of the choices:A - Keep using
RulesCommand
for both; if a rule identifier is passed, it always wins over the other options; otherwise, it will list all rules (and filter iffilter-enabled
is passed).B - Create a new command,
RuleCommand
(Singular, not plural), that prints only the rule that relates to the passed identifier. And keepRulesCommand
only for displaying multiple rules, according to the filtering options.Both choices have their pros/cons, and I personally prefer A. Do you see any better way of doing this? I'll be happy to open a PR in the next few days according to the suggestions here.
The text was updated successfully, but these errors were encountered: