violations-plugin icon indicating copy to clipboard operation
violations-plugin copied to clipboard

Future of this plugin?

Open tomasbjerre opened this issue 8 years ago • 23 comments

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

tomasbjerre avatar Mar 06 '16 07:03 tomasbjerre

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).

pfhorman avatar Mar 07 '16 17:03 pfhorman

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.

wang-xinhong avatar Apr 10 '16 15:04 wang-xinhong

Maybe a number of the pull requests could be committed first? Thanks

gliptak avatar Oct 17 '16 20:10 gliptak

+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...

tuukkamustonen avatar Oct 24 '16 15:10 tuukkamustonen

A number of file formats supported by Violations Plugin is not supported by the Static Code Analysis based plugins ...

gliptak avatar Oct 24 '16 21:10 gliptak

@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?

tuukkamustonen avatar Oct 24 '16 21:10 tuukkamustonen

Yes a significant rewrite would allow being based on analysis-core.

gliptak avatar Oct 24 '16 22:10 gliptak

I started fiddling with this here: https://github.com/jenkinsci/violations-plugin/tree/violations-lib

tomasbjerre avatar Nov 04 '16 04:11 tomasbjerre

https://groups.google.com/forum/#!topic/jenkinsci-dev/KjyIOtg0wWs

tomasbjerre avatar Nov 05 '16 08:11 tomasbjerre

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

tomasbjerre avatar Nov 05 '16 15:11 tomasbjerre

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

gliptak avatar Nov 05 '16 17:11 gliptak

Nice, they are all implemented now.

tomasbjerre avatar Nov 05 '16 22:11 tomasbjerre

@tomasbjerre that was quick :+1:

gliptak avatar Nov 05 '16 23:11 gliptak

I'll make a 1.0 release as soon as I get accepted as maintainer.

tomasbjerre avatar Nov 07 '16 08:11 tomasbjerre

Great job! 👍 Looking forward for this to be available

Symbianx avatar Nov 08 '16 16:11 Symbianx

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?

uhafner avatar Nov 14 '16 14:11 uhafner

I think I agree with you. I did not know about the warnings plugin but I will have a closer look later.

tomasbjerre avatar Nov 14 '16 14:11 tomasbjerre

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 ?

gliptak avatar Dec 08 '16 01:12 gliptak

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?

tuukkamustonen avatar Dec 14 '16 09:12 tuukkamustonen

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.

tomasbjerre avatar Dec 14 '16 09:12 tomasbjerre

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.

tuukkamustonen avatar Dec 14 '16 09:12 tuukkamustonen

See https://issues.jenkins-ci.org/browse/JENKINS-40439?focusedCommentId=280365&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-280365.

uhafner avatar Dec 14 '16 13:12 uhafner

Let me know if any help is needed to deliver the change

oleg-nenashev avatar Feb 14 '18 12:02 oleg-nenashev