violations-plugin
violations-plugin copied to clipboard
Future of this plugin?
I think this plugin needs a new maintainer. If you want to be one, you can ask for commit access in Jenkins developer mailing list: https://wiki.jenkins-ci.org/display/JENKINS/Adopt+a+Plugin
I may be interested in being a maintainer. But if so, I would make very big changes in it. My opinion is that the code is just to messy to fix. I will not spend more time fixing things like this, and there is alot of that here.
I would suggest that:
- A library for parsing static code analasys reports is first developed. I've started here.
- This plugin should use analysis-core to present the results.
And replace the current code with that implementation. That would make this plugin much less complex and maintainable.
What do you think? @ryoichitaniguchi @rsommerard @MensObscura @nbruno @pfhorman @tandibar @wang-xinhong
I agree that the code isn't the cleanest and can be tricky to understand, and that analysis-core probably should be used if starting over. In the meantime, I think there are some smaller changes queued up as pull requests that could benefit the current users sooner rather than later (ie. waiting for a re-write).
Quite a nice idea to separate such analyzing things from user interface. But I found it's not clear that whether the dependence - analysis-core would go steady within the foreseeable future.
Maybe a number of the pull requests could be committed first? Thanks
+1. The last stable version (that is installable via Plugin manager) is 0.7.11 from Sep 8, 2012, which kinda suggests one to avoid the plugin altogether.
Static Code Analysis plugins look awesome. As there's no development going on here anyway, just start fresh...
A number of file formats supported by Violations Plugin is not supported by the Static Code Analysis based plugins ...
@gliptak I'm not Jenkins expert so maybe I misunderstood something, but wouldn't the idea be to use violations-lib for analyzing the output files and then "somehow" to integrate into analysis-core and analysis-collector for displaying those results?
Yes a significant rewrite would allow being based on analysis-core.
I started fiddling with this here: https://github.com/jenkinsci/violations-plugin/tree/violations-lib
https://groups.google.com/forum/#!topic/jenkinsci-dev/KjyIOtg0wWs
I got it working with the lib and analysis core now.
If the switch is made now, that means these formats are no longer supported (I will implemented as soon as I get my hands on example reports and have the time):
- Codenarc
- Cpd
- Gendarme
- Jcereport
- Simian
- ZptLint
And these are added:
- AndroidLint
- CppCheck
- Flake8
- PiText
A number of sample reports are checked into the tree https://github.com/jenkinsci/violations-plugin/tree/master/src/test/resources/hudson/plugins/violations/types
Nice, they are all implemented now.
@tomasbjerre that was quick :+1:
I'll make a 1.0 release as soon as I get accepted as maintainer.
Great job! 👍 Looking forward for this to be available
Actually most of the parsers of this plug-in are already part of the warnings plugin (which uses analysis-core). Wouldn't it make more sense to integrate remaining ones also into the warnings plug-in?
I think I agree with you. I did not know about the warnings plugin but I will have a closer look later.
https://wiki.jenkins-ci.org/display/JENKINS/Violations still shows Peter as maintainer. Is that simply based on https://github.com/jenkinsci/violations-plugin/blob/master/pom.xml#L40 ?
Did I interpret the discussion correctly and violations-plugin is now deprecated in favor of warnings-plugin? I'm fine with that, I've been using warnings-plugin for a few weeks now and it does the job. I just want to make sure I got it right.
Also, @tomasbjerre what is the future/plan regarding https://github.com/tomasbjerre/violations-lib? As it duplicates the parsers in warnings-plugin, are you planning to switch projects using violations-lib (https://github.com/jenkinsci/violation-comments-to-stash-plugin and https://github.com/jenkinsci/violation-comments-to-github-plugin at least) on top of warnings-plugin instead?
I know for sure that I will not spend time on this plugin. Don't know what will happen to it.
No I will not use the Warnings plugin in my other Jenkins plugins. Simply because I think the Warnings Plugin has made a bad design choice. The functionality that parses static code analysis report files is something that can be used for many things outside of Jenkins. So I think that should be put in a library, and released to Maven Central instead of just released to Jenkins maven repo. With that approach I can use the same parsing algorithms also in Maven and Gradle plugins. Easier for me to maintain my plugins that way.
I see. I opened https://issues.jenkins-ci.org/browse/JENKINS-40439 hoping that maybe you could merge your efforts into violations-lib (or whatever it would be called). Ping @uhafner.
See https://issues.jenkins-ci.org/browse/JENKINS-40439?focusedCommentId=280365&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-280365.
Let me know if any help is needed to deliver the change