-
Notifications
You must be signed in to change notification settings - Fork 462
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
Make the analyzer that warns about ISymbol derivations warn about IOperation as well. #863
Comments
An analyzer with that name does not exist. The closest I could find is https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/Core/InternalImplementationOnlyAnalyzer.cs. I have tried to add a test next to https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/Test/InternalImplementationOnlyTests.cs#L177, but it fails because IOperation does not have the [Fact]
public void CSharp_VerifyIOperation()
{
var source = @"
public class Foo : Microsoft.CodeAnalysis.IOperation { }
public class Bar : Microsoft.CodeAnalysis.Semantics.IInvocationExpression { }
";
DiagnosticResult[] expected = new[] { GetCSharpExpectedDiagnostic(2, 14, "Foo", "IOperation"), GetBasicExpectedDiagnostic(5, 14, "Bar", "IInvocationExpression") };
// Verify that IOperation is not implementable.
VerifyCSharp(source, addLanguageSpecificCodeAnalysisReference: true, expected: expected);
} Is there any reason why the marker is missing on |
Please reopen this issue. We should add the unittest above, once the roslyn bits are available. |
@nguerrera can you please reopen? |
I don't understand how I closed it. |
Me neither :) |
Lol. It seems pushing a commit to any repo in GitHub with 'fix org/repo#NNN' will close the issue in another repo. I expect this will get closed a lot as folks take dotnet/roslyn@701404c in to their forks. :( |
We should probably just file another issue to track this :) |
I was thinking the same, just created #999. |
Closing this issue since the remaining work is tracked by #999 |
Analyzer package
Microsoft.CodeAnalysis.Analyzers
Analyzer
DoNotDerviceFromISymbol
Extend this analyzer to warn about IOperation as well.
The text was updated successfully, but these errors were encountered: