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
Why should this rule be added? Share links to existing discussion about what
the community thinks about this.
Using fallthrough makes code harder to read and, in most cases, can be replaced by combining cases. LinkedIn's Swift Style Guide also thinks that (item 3.4.5).
Provide several examples of what would and wouldn't trigger violations.
// should trigger
switch foo {case.bar:
fallthrough
case.bar2:
fallthrough
case .bar3
something()}// shouldn't trigger
switch foo {case.bar,.bar2,.bar3:something()}
Should the rule be configurable, if so what parameters should be configurable?
Only severity.
Should the rule be opt-in or enabled by default? Why?
See README.md for guidelines on when to mark a rule as opt-in.
Opt-in. In the end, this is still a matter of style and there are situations where you can't just combine cases.
The text was updated successfully, but these errors were encountered:
New Issue Checklist
Rule Request
Avoid
fallthrough
insideswitch
statements.the community thinks about this.
Using
fallthrough
makes code harder to read and, in most cases, can be replaced by combiningcases
. LinkedIn's Swift Style Guide also thinks that (item 3.4.5).Only severity.
See README.md for guidelines on when to mark a rule as opt-in.
Opt-in. In the end, this is still a matter of style and there are situations where you can't just combine cases.
The text was updated successfully, but these errors were encountered: