CSharpImmutableObjectMethodAnalyzer does not work when MS.CA.Workspaces is not installed #1128
Labels
Area-Microsoft.CodeAnalysis.Analyzers
Bug
The product is not behaving according to its current intended design
False_Positive
A diagnostic is reported for non-problematic case
help wanted
The issue is up-for-grabs, and can be claimed by commenting
Milestone
Analyzer package
Microsoft.CodeAnalysis.Analyzers
Analyzer
CSharpImmutableObjectMethodAnalyzer
Repro steps
Create a new C# project.
Install the package
Microsoft.CodeAnalysis.CSharp
, but notMicrosoft.CodeAnalysis.CSharp.Workspaces
Write code that doesn't use the returned value from a method on an immutable object:
Expected behavior
The last line reports:
Actual behavior
No warning.
This is caused by this line, which means that when symbols from MS.CA.Workspaces are not found, the analyzer does nothing.
The text was updated successfully, but these errors were encountered: