Bug 99907 - [NEW PORT] devel/pmd: Static analysis tool for Java source code
Summary: [NEW PORT] devel/pmd: Static analysis tool for Java source code
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Herve Quiroz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-08 09:00 UTC by Alex Varju
Modified: 2006-07-12 12:48 UTC (History)
0 users

See Also:


Attachments
pmd-3.7.shar (6.20 KB, text/plain)
2006-07-08 09:00 UTC, Alex Varju
no flags Details
pmd.shar (7.78 KB, application/x-shar)
2006-07-11 07:17 UTC, Hervé Quiroz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Varju 2006-07-08 09:00:47 UTC
PMD scans Java source code and looks for potential problems like:

    * Possible bugs - empty try/catch/finally/switch statements
    * Dead code - unused local variables, parameters and private methods
    * Suboptimal code - wasteful String/StringBuffer usage
    * Overcomplicated expressions - unnecessary if statements, for loops 
      that could be while loops
    * Duplicate code - copied/pasted code means copied/pasted bugs

WWW: http://pmd.sourceforge.net/

Generated with FreeBSD Port Tools 0.77
Comment 1 Herve Quiroz freebsd_committer freebsd_triage 2006-07-11 06:50:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->hq

I'll handle this.
Comment 2 Hervé Quiroz 2006-07-11 07:17:32 UTC
Hi,

Here is a new version of the port with a few improvements:

- Renamed patch files to please portlint(1)
- Add $FreeBSD$ tags in patch files and some explanation regarding their
  respective purpose
- Install JAR files in DATADIR=${JAVASHAREDIR}/${PORTNAME} (because
  ${JAVAJARDIR} is for Java libraries)
- Set JAVA_VERSION=1.3+ as the website reports a minimum requirement on
  JDK 1.3
- Define JAVA_VERSION in the shell scripts accordingly
- Patch shell scripts so that they use /bin/sh rather then /bin/bash
- Use absolute path for javavmwrapper so that user defined aliases do
  not mess up with the scripts
- Use %%DATADIR%% in pkg-plist

Could you please test this new version?

Herve
Comment 3 Herve Quiroz freebsd_committer freebsd_triage 2006-07-11 07:31:58 UTC
State Changed
From-To: open->feedback

Submitter asked for a review.
Comment 4 Alex Varju 2006-07-12 05:28:58 UTC
It looks like patch-pmd.sh has a reference to "JAVA_VERSION/pmd" rather 
than "%%DATADIR%%".  Other than this one bit, the proposed changes all 
look good to me.
Comment 5 Herve Quiroz freebsd_committer freebsd_triage 2006-07-12 12:48:16 UTC
State Changed
From-To: feedback->closed

New port added. 

Thanks for your contribution!