Open mavasani opened 8 years ago
Also extend it to handle Pure attribute - @nguerrera can you please add more context on what needs to be done?
Any method marked [Pure] indicates that it has no side effect. As such, it is always wrong to call it and not use the return value.
This is blocked on dotnet/roslyn#7282, moving to Unknown milestone.
@mavasani The linked roslyn issue is now fixed. The issue can be addressed once you move to a version containing the new API.
DoNotIgnoreMethodResultsAnalyzer.IsHResultOrErrorCodeReturningMethod
does not completely match the FXCop implementation here - especially for ComImport types with methods marked with PreserveSig.We need to tune this method to match the FxCop behavior once https://github.com/dotnet/roslyn/issues/7282 is addressed. I will also add a skip test
UnusedComImportPreserveSig
for this issue.