Closed carstencodes closed 1 year ago
@carstencodes Thank you for your suggestion! I think it makes sense 👍
Prototype currently available at https://github.com/carstencodes/protolint/commit/d568455380c3c5bf1b031c01d1003d26e18e985c
Actually replaced -add-report sarif=${pwd}/out.sarif
with -add-reporter sarif:${pwd}/out.sarif
, hence flags might also use assign characters.
Currently working on tests ...
In CI/CD Scenarios or in local development, it is quite the case, that a linter must produce different results.
CI/CD
In CI/CD Pipelines (like github actions, gitlab or Azure DevOps), a console logger using a proprietary format is used. On the other hand, the connected code quality system like Sonarqube, Github CodeQL etc. expects a certain file.
Local IDE
IDEs support both - using a result file and command line output to parse using a matcher expression (cf VsCode).
Conclusion
It would be a good feature to add support for a second (or maybe more) reporters, that can write their output to files.
e.g:
What do you think? I would actually like to give it a try and help with a contribution.