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
// Old logic, rollback once https://github.com/dotnet/fsharp/issues/15972 is fixed (likely on Roslyn side, since we're returning diagnostics, but they're not getting to VS).
80
+
(*
79
81
match diagnosticType with
80
82
| DiagnosticsType.Syntax ->
81
83
for diagnostic in parseResults.Diagnostics do
@@ -88,6 +90,23 @@ type internal FSharpDocumentDiagnosticAnalyzer [<ImportingConstructor>] () =
88
90
errors.Add(diagnostic) |> ignore
89
91
90
92
errors.ExceptWith(parseResults.Diagnostics)
93
+
*)
94
+
95
+
// TODO: see comment above, this is a workaround for issue we have in current VS/Roslyn
96
+
match diagnosticType with
97
+
| DiagnosticsType.Syntax ->
98
+
for diagnostic in parseResults.Diagnostics do
99
+
errors.Add(diagnostic)|> ignore
100
+
101
+
// We always add syntactic, and do not exclude them when semantic is requested
// TODO: once workaround (https://github.com/dotnet/fsharp/pull/15982) will not be needed, this should be reverted back to normal method (see PR)
101
+
leterrors=
102
+
getDiagnostics fileContents
103
+
|> Seq.filter (fun e -> e.Severity = expectedSeverity)
104
+
|> Seq.toArray
105
+
106
+
errors.Length
107
+
|> Assert.shouldBeEqualWith 2"There should be two errors generated"
// TODO: once workaround (https://github.com/dotnet/fsharp/pull/15982) will not be needed, this should be reverted back to normal method (see PR)
0 commit comments