-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Remove code only called by tests #80140
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
Remove code only called by tests #80140
Conversation
@@ -1,493 +0,0 @@ | |||
// Licensed to the .NET Foundation under one or more agreements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entire complex type was never used in product scenarios. But was only called from tests... yikes.
|
||
// In this case, the analyzers are ran twice. This appears to be a bug in SkippedHostAnalyzersInfo.Create, because it calls | ||
// HostDiagnosticAnalyzers.CreateProjectDiagnosticAnalyzersPerReference which already filters out references, it doesn't return any | ||
// references to skip. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yaay... a test that was only validating broken behavior from a component not actually called from real product code...
d9f15e9
to
aff20ed
Compare
Assert.Equal(1, diagnosticsMapResults.Length); | ||
var diagnostic = diagnosticsMapResults.Single(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assert.Equal(1, diagnosticsMapResults.Length); | |
var diagnostic = diagnosticsMapResults.Single(); | |
var diagnostic = Assert.Single(diagnosticsMapResults); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will roll into followup. thanks!
var analyzerResults = diagnosticsMapResults.Diagnostics.Single(); | ||
Assert.Equal(analyzerHostId, analyzerResults.Item1); | ||
Assert.Equal(1, analyzerResults.Item2.Semantic.Length); | ||
var analyzerResults = diagnosticsMapResults.Single(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var analyzerResults = diagnosticsMapResults.Single(); |
// references to skip. | ||
Assert.Equal(2, diagnosticsMapResults.Diagnostics.Length); | ||
// We should only get one diagnostic as the two analyzers have the same ID and will be deduped. | ||
Assert.Equal(1, diagnosticsMapResults.Length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assert.Equal(1, diagnosticsMapResults.Length); | |
Assert.Single(diagnosticsMapResults); |
No description provided.