-
-
Notifications
You must be signed in to change notification settings - Fork 794
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
Implement new rule ImplictUnitReturnTypet #2781
Conversation
11a8c4b
to
135cdba
Compare
...ules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/ExpressionFunctionReturnsUnit.kt
Outdated
Show resolved
Hide resolved
...ules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/ExpressionFunctionReturnsUnit.kt
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #2781 +/- ##
============================================
+ Coverage 80.52% 80.64% +0.11%
- Complexity 2335 2350 +15
============================================
Files 387 388 +1
Lines 6993 7026 +33
Branches 1269 1281 +12
============================================
+ Hits 5631 5666 +35
+ Misses 726 716 -10
- Partials 636 644 +8
Continue to review full report at Codecov.
|
...ules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/ExpressionFunctionReturnsUnit.kt
Outdated
Show resolved
Hide resolved
...ules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/ExpressionFunctionReturnsUnit.kt
Outdated
Show resolved
Hide resolved
...ules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/ExpressionFunctionReturnsUnit.kt
Outdated
Show resolved
Hide resolved
...ules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/ExpressionFunctionReturnsUnit.kt
Outdated
Show resolved
Hide resolved
...ules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/ExpressionFunctionReturnsUnit.kt
Outdated
Show resolved
Hide resolved
...ules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/ExpressionFunctionReturnsUnit.kt
Outdated
Show resolved
Hide resolved
...ules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/ExpressionFunctionReturnsUnit.kt
Outdated
Show resolved
Hide resolved
e2e136d
to
cf4b7d3
Compare
...t-rules/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/ImplicitUnitReturnTypeSpec.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.
LGTM, just a couple of minor nits
...t-rules/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/ImplicitUnitReturnTypeSpec.kt
Outdated
Show resolved
Hide resolved
...t-rules/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/ImplicitUnitReturnTypeSpec.kt
Outdated
Show resolved
Hide resolved
…/bugs/ImplicitUnitReturnTypeSpec.kt Co-authored-by: Nicola Corti <corti.nico@gmail.com>
…/bugs/ImplicitUnitReturnTypeSpec.kt Co-authored-by: Nicola Corti <corti.nico@gmail.com>
This rule suggests to use block statements for functions when the return type is of type Unit.