-
Notifications
You must be signed in to change notification settings - Fork 7
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
NS3002 false positive #118
Comments
Hi @AdamWillden thank you for reporting, could you show definition of IMapper interface? |
@tpodolak sorry... complete lack of info from me It is AutoMapper: https://github.com/AutoMapper/AutoMapper/blob/master/src/AutoMapper/IMapper.cs |
P.S. thanks for creating this. Well worth the effort :-) and your hard work is appreciated. |
This bug is caused due to the way we process and compare method arguments. In your case the method is defined as public TResult Map<TResult>(object input); When analyzer analyses usage of _.Arg it checks the method parameters of What analyzer should do is to take parameter type from the invocation rather than from method symbol. In that case it will know that as you used Map with Invitation type and it is fine to do Arg in callback. This should be possible to fix but might be tricky to do correctly for named and optional parameters. I will try to look at this over the weekend |
Fantastic, thank you again |
The text was updated successfully, but these errors were encountered: