Closed jasonab closed 6 years ago
Can you please change to the latest version and verify again?
I still see it with these versions: spotbugs-maven-plugin-3.1.0-20170923.035155-1 spotbugs-3.1.0-RC5 fb-contrib 7.0.5sb
The latest spotbugs version is 3.1.0.
I still see it with 3.1.0 on the same Maven plugin snapshot
@jasonab Is this related to this -> here
@iloveeclipse I haven't released official 3.1.0 cut yet. Because it looks like the issue with gui might be fixed now as it had previously attempted PR that needs cleaned up and seems developer trying to fix it might have it addressed soon, I'll wait a bit to pick that up. Hopefully it is same issue as this here.
@hazendaz seems like that might very well be the case
It's done.
thanks @VsevolodGolovanov
@jasonab Can you try version 3.1.0-RC7 of spotbugs-maven-plugin and let me know if this issue is addressed?
Well, now I'm getting a different error:
[ERROR] Failed to execute goal com.github.spotbugs:spotbugs-maven-plugin:3.1.0-RC7:gui (default-cli) on project user-management-service: Execution default-cli of goal com.github.spotbugs:spotbugs-maven-plugin:3.1.0-RC7:gui failed: java doesn't support the nested "getThresholdParameter" element.: The
This is using RC7 of the maven plugin, and 3.1.0 of spotbugs. I was using plugins as well, but removing them did not eliminate the error.
@VsevolodGolovanov I"m unfamiliar with this piece. It doesn't look like the code is correct. Simple run of the gui fails as @jasonab indicated. I moved the threshold method into the findbugs trait class. Then it complianed that there was no threshold so I assumed that was in the wrong place. However, adding the threshold, it then crashes because threshold is not a valid option to gui. So I commented that out, now it opens. I'm not sure what the end use case is so I'm a bit worried about sending a PR.
So essentially, I think
spotbugsArgs << getThresholdParameter()
Does not belong in the GUI code. Can you confirm?
I don't understand the intent either. I just checked that it wasn't my subj-related code that added the issue. Then I posted the likely offending commit to save others some time looking for it. I should've been more clear about all this in my previous comment.
I created FindBugsPluginsTrait to consolidate the FindBugs plugins related logic, so this commit doesn't make sense to me at all on the code structure level.
@gleclaire Can you help out here?
Yes I accidentally checked in some code I was working on to have the gui have the parameters the command line does.
I will fix and commit.
Unfortunately I have not found a good way to do automated integration tests for the gui
Thanks @gleclaire
@VsevolodGolovanov I have released 3.1.0-RC8. Can you take a look and let me know if this solves the overall issue?
My apologies for the delayed feedback here. RC8 appears to solve the problem for me.
@jasonab Thanks! I'll close this ticket now.
Document at http://spotbugs.readthedocs.io/en/latest/maven.html should reference RC8 since RC7 has this issue.
@urbandroid Can you report that over on spotbugs? 3.1.1 of this plugin was released so no override is needed now.
Or actuallly not even sure where to open that for a fix myself. @iloveeclipse where do we update the doc for maven information? This issue is fixed on 3.1.1 release and we should reference the right version on the docs. I sort of think that comes out of spotbugs itself as I found the source page but it has a bunch of variables and not sure where those are set to show the right stuff.
where do we update the doc for maven information?
Readthedocs has a good feature: on every page you read you see the link in the top right corner "Edit on GitHub". In current case this would be https://github.com/spotbugs/spotbugs/blob/master/docs/maven.rst
.
I'm not sure if I should file this here or in the GUI project, but since I run the GUI through the maven plugin, I'll start here.
I have several plugins configured to run through the maven plugin:
and they run and generate bugs. But, when I run
mvn spotbugs:gui
they show up as "Unknown Bug Pattern" and I don't see the JARs in the classpath.