Statiq.Framework icon indicating copy to clipboard operation
Statiq.Framework copied to clipboard

Add possibility to write analyzer output to machine readable log

Open pascalberger opened this issue 4 years ago • 2 comments

It would be nice to have the possibility to write analyzer output (and other warnings, errors) written to a machine readable log file which can further be processed by other tools (e.g. report broken links to pull requests, create report with warnings, break builds). Using an existing file format, like EsLint json would be perfect since this would allow to use it with existing tooling supporting the format.

pascalberger avatar Jan 25 '21 22:01 pascalberger

A benefit to using an existing format (EsLint, https://testanything.org/tap-version-13-specification.html, etc.) would be that it could work with existing tooling.

daveaglick avatar Jan 25 '21 22:01 daveaglick

@daveaglick Thinking about giving this a try.

A possible design could be to introduce a new IAnalyzerReporter interface, with an implementation to use the logger of the engine (current behavior) and other implementations to write specific file formats. AnalyzerCollection.LogResults would then write the results based on the configured IAnalyzerReporter instead of using hard coded engine logger, like in current implementation.

Would that make sense?

pascalberger avatar Aug 05 '21 13:08 pascalberger