Skip to content

Conversation

@rmohan20
Copy link
Contributor

Each rule would now have control over enabling itself. By default, all SFGE rules are disabled.

if (!Modifier.isAbstract(ruleType.getModifiers())) {
rules.add(getRuleInner(ruleType.getName()));
final AbstractRule rule = getRuleInner(ruleType.getName());
if (rule.isEnabled()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's where we check if a rule is enabled or not before adding it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love that getAllRules() doesn't actually return all rules. Can we rename it to getEnabledRules()? Maybe still have a getAllRules() that does return all rules, and a helper method that both delegate to that accepts a boolean parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid point. Creating an update.

@rmohan20 rmohan20 force-pushed the rm/configToDisableSfgeRules branch from 6e68228 to 7e822f5 Compare July 6, 2022 17:48
@rmohan20 rmohan20 merged commit 5f13a28 into dev-3 Jul 7, 2022
@stephen-carter-at-sf stephen-carter-at-sf deleted the rm/configToDisableSfgeRules branch May 17, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants