@@ -153,7 +153,7 @@ let private getFolderFor filePath (): Result<Folder, FSharpLintServiceError> =
153153 else match Folder.FromFile filePath with
154154 | None -> Error FSharpLintServiceError.FileDoesNotExist
155155 | Some folder -> Ok folder
156-
156+
157157 handleFile filePath
158158
159159let private getDaemon ( agent : MailboxProcessor < Msg >) ( folder : Folder ) : Result < JsonRpc , FSharpLintServiceError > =
@@ -190,26 +190,26 @@ let private daemonNotFoundResponse filePath (error: GetDaemonError) : Task<FShar
190190 workingDirectory,
191191 pathEnvironmentVariable,
192192 error)) ->
193- $" FSharpLint.Client tried to run `%s {executableFile} %s {arguments}` inside working directory \" {workingDirectory}\" but could not find \" %s {executableFile}\" on the PATH (%s {pathEnvironmentVariable}). Error: %s {error}" ,
194- FSharpLintResponseCode.ErrDaemonCreationFailed
193+ ( $" FSharpLint.Client tried to run `%s {executableFile} %s {arguments}` inside working directory \" {workingDirectory}\" but could not find \" %s {executableFile}\" on the PATH (%s {pathEnvironmentVariable}). Error: %s {error}" ,
194+ FSharpLintResponseCode.ErrDaemonCreationFailed)
195195 | GetDaemonError.DotNetToolListError( DotNetToolListError.ProcessStartError( ProcessStartError.UnexpectedException( executableFile,
196196 arguments,
197197 error)))
198198 | GetDaemonError.FSharpLintProcessStart( ProcessStartError.UnexpectedException( executableFile, arguments, error)) ->
199- $" FSharpLint.Client tried to run `%s {executableFile} %s {arguments}` but failed with \" %s {error}\" " ,
200- FSharpLintResponseCode.ErrDaemonCreationFailed
199+ ( $" FSharpLint.Client tried to run `%s {executableFile} %s {arguments}` but failed with \" %s {error}\" " ,
200+ FSharpLintResponseCode.ErrDaemonCreationFailed)
201201 | GetDaemonError.DotNetToolListError( DotNetToolListError.ExitCodeNonZero( executableFile,
202202 arguments,
203203 exitCode,
204204 error)) ->
205- $" FSharpLint.Client tried to run `%s {executableFile} %s {arguments}` but exited with code {exitCode} {error}" ,
206- FSharpLintResponseCode.ErrDaemonCreationFailed
205+ ( $" FSharpLint.Client tried to run `%s {executableFile} %s {arguments}` but exited with code {exitCode} {error}" ,
206+ FSharpLintResponseCode.ErrDaemonCreationFailed)
207207 | GetDaemonError.InCompatibleVersionFound ->
208- " FSharpLint.Client did not found a compatible dotnet tool version to launch as daemon process" ,
209- FSharpLintResponseCode.ErrToolNotFound
208+ ( " FSharpLint.Client did not found a compatible dotnet tool version to launch as daemon process" ,
209+ FSharpLintResponseCode.ErrToolNotFound)
210210 | GetDaemonError.CompatibleVersionIsKnownButNoDaemonIsRunning( FSharpLintVersion version) ->
211- $" FSharpLint.Client found a compatible version `%s {version}` but no daemon could be launched." ,
212- FSharpLintResponseCode.ErrDaemonCreationFailed
211+ ( $" FSharpLint.Client found a compatible version `%s {version}` but no daemon could be launched." ,
212+ FSharpLintResponseCode.ErrDaemonCreationFailed)
213213
214214 { Code = int code
215215 FilePath = filePath
@@ -226,10 +226,10 @@ let private cancellationWasRequestedResponse filePath : Task<FSharpLintResponse>
226226
227227let mapResultToResponse ( filePath : string ) ( result : Result < Task < FSharpLintResponse >, FSharpLintServiceError >) =
228228 match result with
229- | Ok t -> t
229+ | Ok version -> version
230230 | Error FSharpLintServiceError.FileDoesNotExist -> fileNotFoundResponse filePath
231231 | Error FSharpLintServiceError.FilePathIsNotAbsolute -> fileNotAbsoluteResponse filePath
232- | Error( FSharpLintServiceError.DaemonNotFound e ) -> daemonNotFoundResponse filePath e
232+ | Error( FSharpLintServiceError.DaemonNotFound err ) -> daemonNotFoundResponse filePath err
233233 | Error FSharpLintServiceError.CancellationWasRequested -> cancellationWasRequestedResponse filePath
234234
235235type LSPFSharpLintService () =
@@ -239,7 +239,7 @@ type LSPFSharpLintService() =
239239 interface IFSharpLintService with
240240 member this.Dispose () =
241241 if not cts.IsCancellationRequested then
242- agent.PostAndReply Reset |> ignore
242+ agent.PostAndReply Reset |> ignore<_>
243243 cts.Cancel()
244244
245245 member _.VersionAsync ( versionRequest : VersionRequest , ? cancellationToken : CancellationToken ) : Task < FSharpLintResponse > =
@@ -252,8 +252,8 @@ type LSPFSharpLintService() =
252252 Methods.Version,
253253 cancellationToken = Option.defaultValue cts.Token cancellationToken
254254 )
255- .ContinueWith( fun ( t : Task < string >) ->
255+ .ContinueWith( fun ( task : Task < string >) ->
256256 { Code = int FSharpLintResponseCode.OkCurrentDaemonVersion
257- Result = Content t .Result
257+ Result = Content task .Result
258258 FilePath = versionRequest.FilePath }))
259259 |> mapResultToResponse versionRequest.FilePath
0 commit comments