-
-
Notifications
You must be signed in to change notification settings - Fork 822
Implement AlsoCouldBeApply Rule #5333
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
Conversation
BraisGabin
left a comment
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 to implement this rule! 5 years since it was proposed 😄. LGTM.
|
I think the rule name should be a little more specific, like |
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.
This looks like a nice rule, well done!
detekt-rules-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/MisusedAlsoSpec.kt
Outdated
Show resolved
Hide resolved
...kt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/StyleGuideProvider.kt
Outdated
Show resolved
Hide resolved
detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/MisusedAlso.kt
Outdated
Show resolved
Hide resolved
detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/MisusedAlso.kt
Show resolved
Hide resolved
detekt-rules-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/MisusedAlsoSpec.kt
Outdated
Show resolved
Hide resolved
detekt-rules-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/MisusedAlsoSpec.kt
Outdated
Show resolved
Hide resolved
TWiStErRob
left a comment
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.
I'm good, except pending conversations, @BraisGabin can you please look again?
...-rules-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/AlsoCouldBeApplySpec.kt
Show resolved
Hide resolved
detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/MisusedAlso.kt
Outdated
Show resolved
Hide resolved
TWiStErRob
left a comment
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.
I had a dream about this, left 3 more comments :)
detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/AlsoCouldBeApply.kt
Outdated
Show resolved
Hide resolved
…is focused on `also` keyword
BraisGabin
left a comment
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.
I re-reviewed the PR and it looks great. Thanks for the reviews @TWiStErRob and the changes @Tommyten.
cortinico
left a comment
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.
Great stuff! Just a minor nit
This pullrequest adds a rule to detect
alsoblocks, which could be simplified by using anapplyblock, as discussed in #518.Closes #518