Violation Comments to GitHub1.39Minimum Jenkins requirement: 2.1ID: violation-comments-to-github
This plugin uses Violation Comments to GitHub Lib. It will find report files from static code analysis and comment GitHub pull requests with the content.
You can have a look at violations-test to see what the result may look like.
There is also plugins for:
It supports same formats as Violations Lib:
- RubyCop with `rubycop -f clang file.rb`
- GoVet Same format as GoLint.
- Lint A common XML format, used by different linters.
- PHPMD with `phpmd api.php xml ruleset.xml`
Some formats may vary. Examples of the exact supported formats can be found here.
Missing a format? Open an issue here!
There is also:
You will need to the *pull request id* for the pull request that was built. You may want to have a look at Generic Webhook Trigger plugin or GitHub Pull Request Builder Plugin, it provides the environment variable ghprbPullId.
You must perform the merge before doing the analysis for the lines to match the lines in the pull request.
When installed, a post build action will be available.
The pull request will be commented like this.
This plugin can be used with the Job DSL Plugin. In this example the GitHub Pull Request Builder Plugin is used to trigger, merge and provide environment variables needed.