ionide / FSharp.Analyzers.SDK

Library for building custom analyzers for F# / FSAC
http://ionide.io/FSharp.Analyzers.SDK/
MIT License
74 stars 21 forks source link

Console colour not being reset before fsharp-analyzers cli tool exits? #215

Closed Numpsy closed 1 month ago

Numpsy commented 1 month ago

When testing #214 I got this in my console (Windows 10 with windows terminal):

image

i.e. it printed the analyzer suggestion in blue, and then left the console colour set to blue such that the next prompt was blue.

I wonder whether https://github.com/ionide/FSharp.Analyzers.SDK/blob/bee7ea7a44b20b09d594dc9e23b407b1f1d086f6/src/FSharp.Analyzers.Cli/CustomLogging.fs#L75 should be writing out the escape codes to reset the colour rather than just setting Console.ForegroundColor ?

Maybe it'd also be fixed by #180 though, I haven't tested it.

dawedawe commented 1 month ago

Hey @Numpsy, thanks for making us aware of this. I'll try to take a look at the end of the week.