tomasbjerre / violations-lib

Java library for parsing report files from static code analysis.
Apache License 2.0
148 stars 39 forks source link

[Question] What's the best way to use `violations-lib` from GitHub Actions? #135

Closed leinardi closed 2 years ago

leinardi commented 2 years ago

Hi, I was wondering what would you say is the best way to use violations-lib from GitHub Actions. Is the Violation Comments to GitHub Gradle Plugin the best solution? Or is there a GitHub Action that can be used directly from a workflow?

tomasbjerre commented 2 years ago

I never used Github actions.

I use the command line tools when working with Jenkins.

leinardi commented 2 years ago

Thank you for the answer. I was also ignoring it for long time until I found out that is free to use for public projects (same as TravisCI) and that the there is a way to run Android emulators with hardware acceleration on it (huge plus over other CI services).

Anyway, it also has a marketplace where the community can easily publish plugins (they are called actions) and, at the moment, I was not able to find a plugin that could report back the violations to the PR as comments. So, if you are looking for a way to expand, making a GitHub Action for violations-lib could be a way to expand to this new market. From what I saw this actions are usually simple scripts so, I guess, you could reuse the CLI client and just provide a nice way for GitHub Actions users to call it transparently.

tomasbjerre commented 2 years ago

I created it here: https://github.com/tomasbjerre/violation-comments-action

leinardi commented 2 years ago

Nice! Thanks!