From d53443347b35b81cc2704f885318d0f96975eeb2 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Mon, 23 Nov 2020 17:08:10 +0300 Subject: [PATCH] Disable unused opens warnings for type imports An FCS update would allow to enable it back again: https://github.com/dotnet/fsharp/pull/10510 --- .../FSharp.Psi.Features/src/Daemon/Stages/UnusedOpensStage.fs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ReSharper.FSharp/src/FSharp.Psi.Features/src/Daemon/Stages/UnusedOpensStage.fs b/ReSharper.FSharp/src/FSharp.Psi.Features/src/Daemon/Stages/UnusedOpensStage.fs index 1b968a75c6..24caf69bc5 100644 --- a/ReSharper.FSharp/src/FSharp.Psi.Features/src/Daemon/Stages/UnusedOpensStage.fs +++ b/ReSharper.FSharp/src/FSharp.Psi.Features/src/Daemon/Stages/UnusedOpensStage.fs @@ -49,6 +49,9 @@ and UnusedOpensStageProcess(fsFile: IFSharpFile, daemonProcess: IDaemonProcess) | null -> () | openDirective -> + // todo: remove after FCS update, https://github.com/dotnet/fsharp/pull/10510 + if isNotNull openDirective.TypeKeyword then () else + let range = openDirective.GetHighlightingRange() highlightings.Add(HighlightingInfo(range, UnusedOpenWarning(openDirective))) committer.Invoke(DaemonStageResult(highlightings))