@@ -165,14 +165,14 @@ let private getDaemon (agent: MailboxProcessor<Msg>) (folder: Folder) : Result<J
165165 | Error gde -> Error( FSharpLintServiceError.DaemonNotFound gde)
166166
167167let private fileNotFoundResponse filePath : Task < FSharpLintResponse > =
168- { Code = int FSharpLintResponseCode.FileNotFound
168+ { Code = int FSharpLintResponseCode.ErrFileNotFound
169169 FilePath = filePath
170170 Result = Content $" File \" %s {filePath}\" does not exist."
171171 }
172172 |> Task.FromResult
173173
174174let private fileNotAbsoluteResponse filePath : Task < FSharpLintResponse > =
175- { Code = int FSharpLintResponseCode.FilePathIsNotAbsolute
175+ { Code = int FSharpLintResponseCode.ErrFilePathIsNotAbsolute
176176 FilePath = filePath
177177 Result = Content $" \" %s {filePath}\" is not an absolute file path. Relative paths are not supported."
178178 }
@@ -192,25 +192,25 @@ let private daemonNotFoundResponse filePath (error: GetDaemonError) : Task<FShar
192192 pathEnvironmentVariable,
193193 error)) ->
194194 $" 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}" ,
195- FSharpLintResponseCode.DaemonCreationFailed
195+ FSharpLintResponseCode.ErrDaemonCreationFailed
196196 | GetDaemonError.DotNetToolListError( DotNetToolListError.ProcessStartError( ProcessStartError.UnExpectedException( executableFile,
197197 arguments,
198198 error)))
199199 | GetDaemonError.FSharpLintProcessStart( ProcessStartError.UnExpectedException( executableFile, arguments, error)) ->
200200 $" FSharpLint.Client tried to run `%s {executableFile} %s {arguments}` but failed with \" %s {error}\" " ,
201- FSharpLintResponseCode.DaemonCreationFailed
201+ FSharpLintResponseCode.ErrDaemonCreationFailed
202202 | GetDaemonError.DotNetToolListError( DotNetToolListError.ExitCodeNonZero( executableFile,
203203 arguments,
204204 exitCode,
205205 error)) ->
206206 $" FSharpLint.Client tried to run `%s {executableFile} %s {arguments}` but exited with code {exitCode} {error}" ,
207- FSharpLintResponseCode.DaemonCreationFailed
207+ FSharpLintResponseCode.ErrDaemonCreationFailed
208208 | GetDaemonError.InCompatibleVersionFound ->
209209 " FSharpLint.Client did not found a compatible dotnet tool version to launch as daemon process" ,
210- FSharpLintResponseCode.ToolNotFound
210+ FSharpLintResponseCode.ErrToolNotFound
211211 | GetDaemonError.CompatibleVersionIsKnownButNoDaemonIsRunning( FSharpLintVersion version) ->
212212 $" FSharpLint.Client found a compatible version `%s {version}` but no daemon could be launched." ,
213- FSharpLintResponseCode.DaemonCreationFailed
213+ FSharpLintResponseCode.ErrDaemonCreationFailed
214214
215215 { Code = int code
216216 FilePath = filePath
@@ -219,7 +219,7 @@ let private daemonNotFoundResponse filePath (error: GetDaemonError) : Task<FShar
219219 |> Task.FromResult
220220
221221let private cancellationWasRequestedResponse filePath : Task < FSharpLintResponse > =
222- { Code = int FSharpLintResponseCode.CancellationWasRequested
222+ { Code = int FSharpLintResponseCode.ErrCancellationWasRequested
223223 FilePath = filePath
224224 Result = Content " FSharpLintService is being or has been disposed."
225225 }
@@ -254,7 +254,7 @@ type LSPFSharpLintService() =
254254 cancellationToken = Option.defaultValue cts.Token cancellationToken
255255 )
256256 .ContinueWith( fun ( t : Task < string >) ->
257- { Code = int FSharpLintResponseCode.Version
257+ { Code = int FSharpLintResponseCode.OkCurrentDaemonVersion
258258 Result = Content t.Result
259259 FilePath = versionRequest.FilePath }))
260260 |> mapResultToResponse versionRequest.FilePath
0 commit comments