SerilogAnalyzer icon indicating copy to clipboard operation
SerilogAnalyzer copied to clipboard

Does this project is still maintained?

Open ProximaB opened this issue 1 year ago • 4 comments

ProximaB avatar Jul 18 '23 12:07 ProximaB

I still take care of the project, and am using it myself extensively, making sure it continues to function, however i didn't have much time or inspiration to work on new stuff so it has been maintenance only for a while.

Suchiman avatar Jul 18 '23 12:07 Suchiman

I'm wondering if it could be converted to official serilog analyzer nuget. That could ensure more people benefit from it and help to maintain the project. https://github.com/serilog/serilog/issues/1938

ProximaB avatar Jul 18 '23 12:07 ProximaB

There used to be talk about doing that in the past with @nblumhardt, including shipping the analyzer in the box, but the discussion about that died down with the current state having been good enough. I'm still open to the idea of shipping it inbox if there's renewed interest in doing so.

Suchiman avatar Jul 18 '23 12:07 Suchiman

I'm still interested in this also, though it's nontrivial work :-)

We'd need to be careful up-front to focus on the most important analyses, and ship them incrementally/conservatively, to make sure we didn't regress people's experience.

Rider now includes some basic message template analyses by default (without any plug-ins):

image

Missing parameters are detected:

image

But other important analyses - like non-constant message templates, and use of interpolated strings, aren't:

image

Rider's analysis also doesn't integrate with MSBuild, so it's easy to miss warnings, especially in team environments.

I spotted your ticket over in the Serilog repo, @ProximaB - thanks for the note over there. Perhaps the way forward would be to sketch things out a little more over there? I think it'd be useful to start with a list of targeted analyses - ones with a very low false-positive rate, such as:

  • Message template syntax errors
  • Non-constant message templates
  • Argument mismatches
  • Exception passed in wrong position

(Any others come to mind?)

I'd expect that there's a lot of inspiration to be gained from SerilogAnalyzer, but I think we'd want to start with something cut-down, and revisit questions like whether VB.NET should be supported, consider updates for nullable reference types is, etc.

Because it's a lot of work, we'd need some indication up front of who would be keen to drive it through to completion :)

Bit of a brain-dump, but hope this helps :-)

nblumhardt avatar Jul 18 '23 23:07 nblumhardt