-
-
Notifications
You must be signed in to change notification settings - Fork 758
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
Remove IT_LITERAL & LET_LITERAL #7310
Conversation
detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnnecessaryLet.kt
Fixed
Show fixed
Hide fixed
detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnnecessaryLet.kt
Fixed
Show fixed
Hide fixed
detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnnecessaryLet.kt
Fixed
Show fixed
Hide fixed
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7310 +/- ##
=========================================
Coverage 84.76% 84.76%
Complexity 3992 3992
=========================================
Files 578 578
Lines 12026 12026
Branches 2477 2477
=========================================
Hits 10194 10194
Misses 606 606
Partials 1226 1226 ☔ View full report in Codecov by Sentry. |
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.
Approved because this is clearly better than before but I would use "it"
directly. At least for me IMPLICIT_LAMBDA_PARAMETER_NAME
is more complex than "it"
.
I think it's better to use type safe values, and using a |
Oh, I thought that it was just a plain string too. I'm still not 100% on board but it's good for me. This PR reduces complexity on our public api and that's the important point. |
If so, we could have our own internal field that maps to |
LET_LITERAL was unused.
IT_LITERAL is provided by
StandardNames.IMPLICIT_LAMBDA_PARAMETER_NAME
which has resulted in more descriptive code IMHO. There was one usage which I've replaced with string"it"
because the rule is literally checking for "`it`-started expressions" so I think this is reasonable.