-
-
Notifications
You must be signed in to change notification settings - Fork 794
ExplicitCollectionElementAccessMethod: Do not report map?.get("foo") #2391
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
Comments
This seems like a false positive. And |
But this access isn’t save. |
I am not sure I follow.... This rule is not about For now, with this rule enabled, we cannot do |
Okay, now I understand. I'll reopen it in a second. |
Yes, I can have a look |
Cool, thanks for helping out! 🙂 |
The
ExplicitCollectionElementAccessMethod
rule seems really useful but it looks like it is also reporting safe map element access:https://github.com/arturbosch/detekt/blob/master/detekt-rules/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/ExplicitCollectionElementAccessMethodSpec.kt#L34
Is it possible to not report the following ?
Or is there an elegant way to fix the issue with the current ?
This fixes it, but it doesn't seems optimal...
The text was updated successfully, but these errors were encountered: