Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev

[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs

 

 

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded


jira at apache

Apr 11, 2012, 7:44 PM

Post #1 of 16 (206 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs

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

Robert Muir commented on LUCENE-3973:
-------------------------------------

{quote}
Should we use both PMD and FindBugs or just one of them?
{quote}

+1 for PMD. I'm only looking at the license here.

> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 11, 2012, 11:48 PM

Post #2 of 16 (202 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Dawid Weiss commented on LUCENE-3973:
-------------------------------------

Both are helpful. We use both and I think FindBugs is slightly more useful than PMD but it's just a subjective opinion not anything I measured.

Also, both can be verbose and a pain in the ass at times when you know the code is right and they still complain... And they are long to execute so they should be part of jenkins nightly/ smoke tests I think, not regular builds (and definitely not ant test...).

> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 11, 2012, 11:48 PM

Post #3 of 16 (203 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Dawid Weiss commented on LUCENE-3973:
-------------------------------------

There is also this interesting tool: http://babelfish.arc.nasa.gov/trac/jpf

I haven't used it and I don't know if it can handle Lucene size codebase (the number of execution paths will be astronomic) but if somebody has some time to play with it, it'd be interesting to hear what it can do.

> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 12, 2012, 11:55 AM

Post #4 of 16 (204 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Hoss Man commented on LUCENE-3973:
----------------------------------

bq. How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

i would suggest going about it incrementally...

* hook into build.xml as optional targets that can be run if you have the neccessary libs installed, don't fail the build just generate the XML report files
* put the needed libs on builds.apache.org, and hook it into the jenkins nightly target, and configure jenkins to display it's pretty version of the xml reports so people can at least see what's going on.
* start adding/tweaking custom rule sets in dev-tools to eliminate rules we don't care about, add rules we want that don't exist, or change the severity of rules we think are more/less important
* tweak the build.xml to fail if anything above some arbitrary severity is tripped
* worry about maven





> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 12, 2012, 12:27 PM

Post #5 of 16 (202 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Dawid Weiss commented on LUCENE-3973:
-------------------------------------

I believe both pmd and findbugs are on maven repos so one could use ivy to fetch them automatically. One thing less to think about.

> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 12, 2012, 2:23 PM

Post #6 of 16 (200 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Hoss Man commented on LUCENE-3973:
----------------------------------

bq. I believe both pmd and findbugs are on maven repos so one could use ivy to fetch them automatically. One thing less to think about.

Unless you run into the same taskdef/classloader/sub-build/permgen-OOM problem we had with clover, and the maven-ant-tasks, and ivy that have prevented us from doing the same thing with them.



> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 12, 2012, 11:48 PM

Post #7 of 16 (209 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Dawid Weiss commented on LUCENE-3973:
-------------------------------------

bq. Unless you run into the same taskdef/classloader/sub-build/permgen-OOM

I was just saying to fetch them via ivy and then spawn a separate jvm to run them, much like you'd do anyway if they are separate installations.

Besides -- we already have an 'ivy warning with instructions', the same can be done with permgen/OOM problems -- detect the current (ANT's) VM's settings (can be done via mx bean) and warn/ fail the build if the defaults are too low, instructing the user to set up ANT_OPTS properly...

I'm not pressing on this, this is a no-issue.

> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 14, 2012, 2:26 AM

Post #8 of 16 (202 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Chris Male commented on LUCENE-3973:
------------------------------------

Actually I could probably make this a top-level target and do all modules at once.

> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
> Attachments: LUCENE-3973.patch, core.html, solr-core.html
>
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 14, 2012, 5:31 AM

Post #9 of 16 (202 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Robert Muir commented on LUCENE-3973:
-------------------------------------

{quote}
I believe both pmd and findbugs are on maven repos so one could use ivy to fetch them automatically. One thing less to think about.
{q

> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
> Attachments: LUCENE-3973.patch, core.html, solr-core.html
>
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 22, 2012, 8:54 PM

Post #10 of 16 (173 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Chris Male commented on LUCENE-3973:
------------------------------------

The patch places all the HTML files under lucene/build/pmd. An alternative approach (and what I was doing before) is to have a pmd dir under each module's build dir.

> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
> Attachments: LUCENE-3973.patch, LUCENE-3973.patch, core.html, solr-core.html
>
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 22, 2012, 9:06 PM

Post #11 of 16 (176 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Robert Muir commented on LUCENE-3973:
-------------------------------------

{quote}
The patch places all the HTML files under lucene/build/pmd. An alternative approach (and what I was doing before) is to have a pmd dir under each module's build dir.
{quote}

We need to be careful about where these results go: it could affect packaging tasks.

> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
> Attachments: LUCENE-3973.patch, LUCENE-3973.patch, LUCENE-3973.patch, core.html, solr-core.html
>
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 22, 2012, 9:10 PM

Post #12 of 16 (176 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Chris Male commented on LUCENE-3973:
------------------------------------

bq. We need to be careful about where these results go: it could affect packaging tasks.

Good point. Then having a single folder for all the results which is outside of the module build dirs is probably safest. The IDE setups do the same thing.

> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
> Attachments: LUCENE-3973.patch, LUCENE-3973.patch, LUCENE-3973.patch, core.html, solr-core.html
>
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 22, 2012, 9:12 PM

Post #13 of 16 (172 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Chris Male commented on LUCENE-3973:
------------------------------------

One thing I also notice is that we probably need to exclude generated classes from those examined. They obviously don't contain the nicest looking code and then to pollute the results, especially for analyzers-common.

> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
> Attachments: LUCENE-3973.patch, LUCENE-3973.patch, LUCENE-3973.patch, core.html, solr-core.html
>
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 22, 2012, 9:16 PM

Post #14 of 16 (175 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Robert Muir commented on LUCENE-3973:
-------------------------------------

{quote}
Good point. Then having a single folder for all the results which is outside of the module build dirs is probably safest.
{quote}

I think its pretty safe really. I just have no idea what PMD produces, and don't want anything sucked in on accident :)

I don't think anything would have been included, but better to be paranoid instead.

> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
> Attachments: LUCENE-3973.patch, LUCENE-3973.patch, LUCENE-3973.patch, LUCENE-3973.patch, core.html, solr-core.html
>
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 22, 2012, 9:19 PM

Post #15 of 16 (180 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Robert Muir commented on LUCENE-3973:
-------------------------------------

{quote}
One thing I also notice is that we probably need to exclude generated classes from those examined. They obviously don't contain the nicest looking code and then to pollute the results, especially for analyzers-common.
{quote}

Well, we can worry about that later I guess... you already have a pmd.excludes so if we want to tweak things like
that we could just define pmd.excludes in analyzers-common or whatever.


> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
> Attachments: LUCENE-3973.patch, LUCENE-3973.patch, LUCENE-3973.patch, LUCENE-3973.patch, core.html, solr-core.html
>
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 22, 2012, 9:23 PM

Post #16 of 16 (173 views)
Permalink
[jira] [Commented] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

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

Chris Male commented on LUCENE-3973:
------------------------------------

Yeah definitely, thats why I included that option.

> Incorporate PMD / FindBugs
> --------------------------
>
> Key: LUCENE-3973
> URL: https://issues.apache.org/jira/browse/LUCENE-3973
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/build
> Reporter: Chris Male
> Attachments: LUCENE-3973.patch, LUCENE-3973.patch, LUCENE-3973.patch, LUCENE-3973.patch, core.html, solr-core.html
>
>
> This has been touched on a few times over the years. Having static analysis as part of our build seems like a big win. For example, we could use PMD to look at {{System.out.println}} statements like discussed in LUCENE-3877 and we could possibly incorporate the nocommit / @author checks as well.
> There are a few things to work out as part of this:
> - Should we use both PMD and FindBugs or just one of them? They look at code from different perspectives (bytecode vs source code) and target different issues. At the moment I'm in favour of trying both but that might be too heavy handed for our needs.
> - What checks should we use? There's no point having the analysis if it's going to raise too many false-positives or problems we don't deem problematic.
> - How should the analysis be integrated in our build? Need to work out when the analysis should run, how it should be incorporated in Ant and/or Maven, what impact errors should have.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.