FSharp.Analyzers.SDK icon indicating copy to clipboard operation
FSharp.Analyzers.SDK copied to clipboard

Use ilogger colorized prettyprint and analyzer uri

Open smoothdeveloper opened this issue 1 year ago • 3 comments

redo #174/#176 on top of @dawedawe #175 (this PR should only show my commit(s) once #175 is merged I think).

I'm not sure how to check the mode that is not using the command line, but I assume; the integration into MSBuild, so please let me know if adjustments are needed there and how I should invoke it in a custom project.

This does two things:

  • only colorizes the log level and analyzer identifier with the log level colouring (red: errors, yellow: warnings, etc.) but not the message (it is generally more readable than swath of red, orange, so long the heading has the color
  • adds the link to the analyzer URI if it is there (it is always in cyan, but can be a problem depending if console background is light or not, we can consider dark blue in such case)

image

Regarding how I initially did it and now, I see we use "vanilla .NET string formatting" instead of interpolation or fsharp formatting specifyier which enforces there are matching arguments.

I was wondering if this was important to use this less safe way due to relying on the logging infrastructure changes done in #175 or we can reconsider going through F# format specifiers without losing on the logging infrastructure integration?

smoothdeveloper avatar Dec 16 '23 00:12 smoothdeveloper

after rebasing all seems consistent (including what fantomas formatted, versus comment), let see if this gets green.

smoothdeveloper avatar Dec 19 '23 03:12 smoothdeveloper

While I like the change, I don't really want to take the risk for the release of the current week. So let's investigate what's going wrong here without rush.

dawedawe avatar Dec 19 '23 08:12 dawedawe

No hurries, no worries :)

smoothdeveloper avatar Dec 19 '23 09:12 smoothdeveloper