We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enum Numbers: String { case one = "one" case two = "two" case three = "three" }
is redundant. Could be simply
enum Numbers: String { case one case two case three }
The text was updated successfully, but these errors were encountered:
Should we handle Int enums as well? 🤔
Int
Sorry, something went wrong.
Maybe. That's not as clear to me.
I'm implementing this and I'm uncertain if we should trigger only if all cases are redundant or if just one case (one violation per case).
This would trigger with the second approach, but not with the first:
private enum ConfigurationKey: String { case disabledRules = "disabled_rules" case enabledRules = "enabled_rules" // deprecated in favor of OptInRules case excluded = "excluded" case included = "included" case optInRules = "opt_in_rules" case reporter = "reporter" case useNestedConfigs = "use_nested_configs" // deprecated case whitelistRules = "whitelist_rules" case warningThreshold = "warning_threshold" }
This should trigger only if all cases are redundant.
No branches or pull requests
is redundant. Could be simply
The text was updated successfully, but these errors were encountered: