[ 
https://issues.apache.org/jira/browse/OOZIE-1986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15523112#comment-15523112
 ] 

Andras Piros edited comment on OOZIE-1986 at 9/26/16 1:55 PM:
--------------------------------------------------------------

As a trivial solution there is the [*static code analysis Jenkins 
plugin*|https://wiki.jenkins-ci.org/display/JENKINS/Static+Code+Analysis+Plug-ins].
 It's nice and applying that with the [*Jenkins Findbugs 
plugin*|https://wiki.jenkins-ci.org/display/JENKINS/FindBugs+Plugin] would give 
us just the correct behavior. Two things versus this solution:
# Cannot run locally before submitting the patch
# I think installing and configuring two new Jenkins plugins to Apache Jenkins 
CI server is not easily done

So we go for the second best option:
# create a new script as {{bin/test-patch-07-findbugs-diff}}
# {{mvn clean verify -DskipTests}} before and after applying the patch, and 
saving each and every module's {{target/findbugs/findbugsXml.xml}} to a secure 
folder
# call the [*{{findbugs-diff}}*|https://github.com/adjohnson916/findbugs-diff] 
app for all the before / after FindBugs {{xml}} pairs
# analyze all the {{findbugs-new.xml}} entries for nodes with XPath 
{{/BugCollection/BugInstance}} entries. Stop on any {{BugInstance}} w/ 
{{priority}} and / or {{rank}} lower than threshold
# have the reports merged and be downloadable in any case


was (Author: andras.piros):
As a trivial solution there is the [*static code analysis Jenkins 
plugin*|https://wiki.jenkins-ci.org/display/JENKINS/Static+Code+Analysis+Plug-ins].
 It's nice and applying that with the [*Jenkins Findbugs 
plugin*|https://wiki.jenkins-ci.org/display/JENKINS/FindBugs+Plugin] would give 
us just the correct behavior. Two things versus this solution:
# Cannot run locally before submitting the patch
# I think installing and configuring two new Jenkins plugins to Apache Jenkins 
CI server is not easily done

So we go for the second best option:
# create a new script as {{bin/test-patch-findbugs-diff}}
# {{mvn clean verify -DskipTests}} before and after applying the patch, and 
saving each and every module's {{target/findbugs/findbugsXml.xml}} to a secure 
folder
# call the [*{{findbugs-diff}}*|https://github.com/adjohnson916/findbugs-diff] 
app for all the before / after FindBugs {{xml}} pairs
# analyze all the {{findbugs-new.xml}} entries for nodes with XPath 
{{/BugCollection/BugInstance}} entries. Stop on any {{BugInstance}} w/ 
{{priority}} and / or {{rank}} lower than threshold
# have the reports merged and be downloadable in any case

> Add findbugs report to pre-commit build
> ---------------------------------------
>
>                 Key: OOZIE-1986
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1986
>             Project: Oozie
>          Issue Type: Bug
>          Components: tests
>            Reporter: Robert Kanter
>            Assignee: Andras Piros
>
> Now that we have OOZIE-1793, it will be really useful to have the pre-commit 
> build generate a findbugs report.  It should probably before and after the 
> patch and only complain it there are more after.  And it should link to the 
> report.  Ideally, this would do some kind of diff (like Hadoop does) so it's 
> easy to identify the new findbugs items.
> You can generate the findbugs reports by running:
> {noformat}
> mvn verify -DskipTests
> {noformat}
> This also runs checkstyle



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to