-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelinter-lint-proposallinter-new-language-featurelinter-status-pendingtype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
We might consider a lint to encourage the use of a logical-or rather than the equivalent empty case logic.
BAD
switch (shape) {
case Square():
case Circle():
print('Symmetric shape');
default:
print('Asymmetric shape');
}
GOOD
switch (shape) {
case Square() | Circle():
print('Symmetric shape');
default:
print('Asymmetric shape');
}
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelinter-lint-proposallinter-new-language-featurelinter-status-pendingtype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug