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

Mailing List Archive: Lucene: Java-Dev

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

 

 

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


jira at apache

Apr 13, 2012, 9:37 PM

Post #1 of 7 (96 views)
Permalink
[jira] [Updated] (LUCENE-3973) Incorporate PMD / FindBugs

[ https://issues.apache.org/jira/browse/LUCENE-3973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Male updated LUCENE-3973:
-------------------------------

Attachment: solr-core.html
core.html

HTML results for lucene core (core) and solr core (solr-core).

> 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 13, 2012, 9:37 PM

Post #2 of 7 (87 views)
Permalink
[jira] [Updated] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-3973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Male updated LUCENE-3973:
-------------------------------

Attachment: LUCENE-3973.patch

Simple POC patch which adds a pmd target to lucene/common-build.xml. It currently uses ivy:cachepath (but I think I prefer the way Hoss suggests).

I will attach some example results from analyzing lucene/solr core.

In our build system, is it possible to run a target for every module? I don't really want to latch this onto {{compile}} like clover.

Still much to do but just showing where things are going.

> 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 #3 of 7 (83 views)
Permalink
[jira] [Updated] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-3973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-3973:
--------------------------------

Comment: was deleted

(was: {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:52 PM

Post #4 of 7 (75 views)
Permalink
[jira] [Updated] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-3973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Male updated LUCENE-3973:
-------------------------------

Attachment: LUCENE-3973.patch

Patch which runs PMD much like RAT. This uses ivy:cachepath still and I haven't seen any OOMs.

Since this doesn't have any impact on the build unless someone explicitly runs it, I'd like to commit this and then begin to tweak.

> 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:05 PM

Post #5 of 7 (81 views)
Permalink
[jira] [Updated] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-3973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Male updated LUCENE-3973:
-------------------------------

Attachment: LUCENE-3973.patch

Improved patch which connects the PMD tasks to the ivy checks we have.

> 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:14 PM

Post #6 of 7 (73 views)
Permalink
[jira] [Updated] (LUCENE-3973) Incorporate PMD / FindBugs [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-3973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-3973:
--------------------------------

Attachment: LUCENE-3973.patch

updated patch with 2 tweaks:
# explicitly exclude pmd/ from binary dist patterns (just in case!)
# only download jars for pmd (not source and javadocs, they are massive)

> 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

May 1, 2012, 8:21 PM

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

[ https://issues.apache.org/jira/browse/LUCENE-3973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Male updated LUCENE-3973:
-------------------------------

Attachment: LUCENE-3973.patch

Updated patch which includes:

- Moved listing of the rules to their own ruleset file, which will allow us to customize them more and so I don't have to keep making changes to common-build.xml
- Added full support for solr and top-level.

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