dotnet / roslyn-analyzers

MIT License
1.59k stars 466 forks source link

Enable RS0041 and fix related issues #3915

Open Evangelink opened 4 years ago

Evangelink commented 4 years ago

@Evangelink Those complaints about oblivious APIs must be suppressed at the moment (typically via editorconfig), as roslyn-analyzers is using netstandard libraries which are all oblivious. For instance IEquatable is referenced from:

#region Assembly netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// C:\Users\jcouv\.nuget\packages\netstandard.library\2.0.3\build\netstandard2.0\ref\netstandard.dll
#endregion

namespace System
{
    public interface IEquatable<T>

Originally posted by @jcouv in https://github.com/dotnet/roslyn-analyzers/pull/3913#issuecomment-665050810

jcouv commented 4 years ago

@Evangelink You've filed a roslyn-analyzers issue, but the current behavior of the publicAPI analyzer seems correct (ie. it warns that oblivious APIs are involved). Can you clarify the ask and rationale?