-
-
Notifications
You must be signed in to change notification settings - Fork 760
New issue
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
Add allowElseExpression configuration for MissingWhenCase rule #3187
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3187 +/- ##
=========================================
Coverage 79.55% 79.56%
- Complexity 2631 2632 +1
=========================================
Files 440 440
Lines 7964 7967 +3
Branches 1521 1520 -1
=========================================
+ Hits 6336 6339 +3
Misses 818 818
Partials 810 810
Continue to review full report at Codecov.
|
dc267b5
to
5b8e2a2
Compare
5b8e2a2
to
e926acd
Compare
...les-errorprone/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/MissingWhenCaseSpec.kt
Show resolved
Hide resolved
...t-rules-errorprone/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/MissingWhenCase.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Nice work.
...t-rules-errorprone/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/MissingWhenCase.kt
Outdated
Show resolved
Hide resolved
...t-rules-errorprone/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/MissingWhenCase.kt
Outdated
Show resolved
Hide resolved
...t-rules-errorprone/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/MissingWhenCase.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Nicola Corti <corti.nico@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR! Please see my attached comments, which only remarks the formatting of a few lines.
...les-errorprone/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/MissingWhenCaseSpec.kt
Outdated
Show resolved
Hide resolved
...les-errorprone/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/MissingWhenCaseSpec.kt
Show resolved
Hide resolved
...les-errorprone/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/MissingWhenCaseSpec.kt
Outdated
Show resolved
Hide resolved
...les-errorprone/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/MissingWhenCaseSpec.kt
Show resolved
Hide resolved
...les-errorprone/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/MissingWhenCaseSpec.kt
Show resolved
Hide resolved
...les-errorprone/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/MissingWhenCaseSpec.kt
Show resolved
Hide resolved
* Add allowElseExpression configuration for MissingWhenCase rule * Add test for non enum, sealed when cases * Update function name to report missing cases Co-authored-by: Nicola Corti <corti.nico@gmail.com> * Update documentation and remove redundant variable * Fix discrepency while commiting from github * Fix formatting issues in test classes Co-authored-by: Nicola Corti <corti.nico@gmail.com>
* Add allowElseExpression configuration for MissingWhenCase rule * Add test for non enum, sealed when cases * Update function name to report missing cases Co-authored-by: Nicola Corti <corti.nico@gmail.com> * Update documentation and remove redundant variable * Fix discrepency while commiting from github * Fix formatting issues in test classes Co-authored-by: Nicola Corti <corti.nico@gmail.com>
* Add allowElseExpression configuration for MissingWhenCase rule * Add test for non enum, sealed when cases * Update function name to report missing cases Co-authored-by: Nicola Corti <corti.nico@gmail.com> * Update documentation and remove redundant variable * Fix discrepency while commiting from github * Fix formatting issues in test classes Co-authored-by: Nicola Corti <corti.nico@gmail.com>
Fixes #3176
allowElseExpression
and default it to true.