You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I was just running a new project through the analyzers, and had thought that I might get a StructDiscriminatedUnionAnalyzer suggestion from a DU that only has empty and string members, but I got nothing.
Looking at my code, the DU in question has a StructuredFormatDisplay attribute, and removing that causes a Consider adding [<Struct>] to Discriminated Union suggestion to appear.
I'm not sure if that is intentional or not, but looking at the analyzer code I wonder if the StartsWith("Struct" at
Describe the bug
I was just running a new project through the analyzers, and had thought that I might get a StructDiscriminatedUnionAnalyzer suggestion from a DU that only has empty and string members, but I got nothing.
Looking at my code, the DU in question has a
StructuredFormatDisplay
attribute, and removing that causes aConsider adding [<Struct>] to Discriminated Union
suggestion to appear.I'm not sure if that is intentional or not, but looking at the analyzer code I wonder if the
StartsWith("Struct"
ationide-analyzers/src/Ionide.Analyzers/Suggestion/StructDiscriminatedUnionAnalyzer.fs
Line 29 in e66e603
To Reproduce
Running the analyzer against a DU such as
results in a
Hint IONIDE-012 : Consider adding [<Struct>] to Discriminated Union
suggestion, but running it againsthas no hint.
Environment (please complete the following information):
Ionide analyzers version 0.11.0
The text was updated successfully, but these errors were encountered: