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
False positive on UnnecessaryEventHandlerParameter
#13
Comments
Ugh, right. Not sure how to solve this without converting this rule to use type resolution (to check that (I'm still a bit hesitant to use type resolution, because I feel that it's not widely adopted at the moment, but perhaps I'm wrong. And maybe putting some direct advice + instructions on enabling it in the README would help) |
Yes, to fix this we will need type resolution. Right now I'm working on this on the detekt side:
With those type resolution will not be experimental anymore and we will inform users about the rules that they have active but they aren't working. |
Great work! So I'll get started. Both in adopting type resolution in our work projects and learning to write rules for it (only saw examples in the Detekt repo, didn't try myself). |
To be honest, they are more complex. But the good part is that there are enoght examples in the detekt repo to find what you need. |
Given this code:
UnnecessaryEventHandlerParameter
raises an issue. But in this case the parameter is necessary becausestate.id
is accesible because of the smart cast that you don't have in the function that call this component.The text was updated successfully, but these errors were encountered: