From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jul 8 08:00:49 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49CBB16A50A for ; Sat, 8 Jul 2006 08:00:49 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88A2443D77 for ; Sat, 8 Jul 2006 08:00:48 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k6880mOi060141 for ; Sat, 8 Jul 2006 08:00:48 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k6880mi7060140; Sat, 8 Jul 2006 08:00:48 GMT (envelope-from gnats) Resent-Date: Sat, 8 Jul 2006 08:00:48 GMT Resent-Message-Id: <200607080800.k6880mi7060140@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alex Varju Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61AB916A4DA for ; Sat, 8 Jul 2006 07:57:25 +0000 (UTC) (envelope-from Alex.Varju@webct.com) Received: from asterix.webct.com (asterix.webct.com [209.87.17.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3D1C43D53 for ; Sat, 8 Jul 2006 07:57:24 +0000 (GMT) (envelope-from Alex.Varju@webct.com) Received: from snapple.webct.com ([10.1.0.45]) by asterix.webct.com over TLS secured channel with Microsoft SMTPSVC(5.0.2195.6713); Sat, 8 Jul 2006 00:57:24 -0700 Received: from snapple.webct.com (localhost [127.0.0.1]) by snapple.webct.com (8.13.1/8.13.1) with ESMTP id k687vI7H004545 for ; Sat, 8 Jul 2006 00:57:18 -0700 (PDT) (envelope-from varju@snapple.webct.com) Received: (from root@localhost) by snapple.webct.com (8.13.1/8.13.1/Submit) id k687vIBh004544; Sat, 8 Jul 2006 00:57:18 -0700 (PDT) (envelope-from varju) Message-Id: <200607080757.k687vIBh004544@snapple.webct.com> Date: Sat, 8 Jul 2006 00:57:18 -0700 (PDT) From: Alex Varju To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/99907: [NEW PORT] devel/pmd: Static analysis tool for Java source code X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 08:00:49 -0000 >Number: 99907 >Category: ports >Synopsis: [NEW PORT] devel/pmd: Static analysis tool for Java source code >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jul 08 08:00:47 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Alex Varju >Release: FreeBSD 5.3-STABLE i386 >Organization: >Environment: System: FreeBSD snapple.webct.com 5.3-STABLE FreeBSD 5.3-STABLE #13: Wed Nov 3 11:31:28 PST >Description: 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 >How-To-Repeat: >Fix: --- pmd-3.7.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # pmd # pmd/files # pmd/files/patch-bin::bgastviewer.sh # pmd/files/patch-bin::cpd.sh # pmd/files/patch-bin::pmd.sh # pmd/files/patch-bin::designer.sh # pmd/Makefile # pmd/distinfo # pmd/pkg-plist # pmd/pkg-descr # echo c - pmd mkdir -p pmd > /dev/null 2>&1 echo c - pmd/files mkdir -p pmd/files > /dev/null 2>&1 echo x - pmd/files/patch-bin::bgastviewer.sh sed 's/^X//' >pmd/files/patch-bin::bgastviewer.sh << 'END-of-pmd/files/patch-bin::bgastviewer.sh' X--- bin/bgastviewer.sh.orig Fri May 26 05:37:58 2006 X+++ bin/bgastviewer.sh Fri Jul 7 21:46:32 2006 X@@ -1 +1,9 @@ X-java -cp ../build:../lib/jakarta-oro-2.0.8.jar:../lib/pmd-3.7.jar:../lib/xercesImpl-2.6.2.jar:../lib/xmlParserAPIs-2.6.2.jar:../lib/jaxen-1.1-beta-7.jar net.sourceforge.pmd.util.viewer.Viewer X+#!/bin/sh X+ X+JARS=`/bin/ls -1 JAVAJARDIR/pmd/*jar` X+CLASSPATH="" X+for jar in $JARS; do X+ CLASSPATH="$CLASSPATH:$jar" X+done X+ X+java -cp $CLASSPATH net.sourceforge.pmd.util.viewer.Viewer END-of-pmd/files/patch-bin::bgastviewer.sh echo x - pmd/files/patch-bin::cpd.sh sed 's/^X//' >pmd/files/patch-bin::cpd.sh << 'END-of-pmd/files/patch-bin::cpd.sh' X--- bin/cpd.sh.orig Sat Jul 8 00:08:24 2006 X+++ bin/cpd.sh Sat Jul 8 00:12:41 2006 X@@ -20,26 +20,8 @@ X exit 1 X fi X X- X-SCRIPT_DIR=`dirname $0` X-CWD="$PWD" X- X-cd "$SCRIPT_DIR/../lib" X-LIB_DIR=`pwd -P` X- X classpath=$CLASSPATH X- X-build_dir="$SCRIPT_DIR/../build" X- X-if [ -d "$build_dir" ]; then X- cd "$build_dir" X- build_dir=`pwd -P` X- classpath=$classpath:$build_dir X-fi X- X-cd "$CWD" X- X-for jarfile in `ls $LIB_DIR/*.jar`; do X+for jarfile in `ls JAVAJARDIR/pmd/*.jar`; do X classpath=$classpath:$jarfile X done X END-of-pmd/files/patch-bin::cpd.sh echo x - pmd/files/patch-bin::pmd.sh sed 's/^X//' >pmd/files/patch-bin::pmd.sh << 'END-of-pmd/files/patch-bin::pmd.sh' X--- bin/pmd.sh.orig Sat Jul 8 00:08:24 2006 X+++ bin/pmd.sh Sat Jul 8 00:14:39 2006 X@@ -7,25 +7,8 @@ X exit 1 X fi X X-SCRIPT_DIR=`dirname $0` X-CWD="$PWD" X- X-cd "$SCRIPT_DIR/../lib" X-LIB_DIR=`pwd -P` X- X classpath=$CLASSPATH X- X-build_dir="$SCRIPT_DIR/../build" X- X-if [ -d "$build_dir" ]; then X- cd "$build_dir" X- build_dir=`pwd -P` X- classpath=$classpath:$build_dir X-fi X- X-cd "$CWD" X- X-for jarfile in `ls $LIB_DIR/*.jar`; do X+for jarfile in `ls JAVAJARDIR/pmd/*.jar`; do X classpath=$classpath:$jarfile X done X END-of-pmd/files/patch-bin::pmd.sh echo x - pmd/files/patch-bin::designer.sh sed 's/^X//' >pmd/files/patch-bin::designer.sh << 'END-of-pmd/files/patch-bin::designer.sh' X--- bin/designer.sh.bak Fri Jan 28 08:13:49 2005 X+++ bin/designer.sh Sat Jul 8 00:15:27 2006 X@@ -1,24 +1,7 @@ X #!/bin/bash X X-SCRIPT_DIR=`dirname $0` X-CWD="$PWD" X- X-cd "$SCRIPT_DIR/../lib" X-LIB_DIR=`pwd -P` X- X classpath=$CLASSPATH X- X-build_dir="$SCRIPT_DIR/../build" X- X-if [ -d "$build_dir" ]; then X- cd "$build_dir" X- build_dir=`pwd -P` X- classpath=$classpath:$build_dir X-fi X- X-cd "$CWD" X- X-for jarfile in `ls $LIB_DIR/*.jar`; do X+for jarfile in `ls JAVAJARDIR/pmd/*.jar`; do X classpath=$classpath:$jarfile X done X END-of-pmd/files/patch-bin::designer.sh echo x - pmd/Makefile sed 's/^X//' >pmd/Makefile << 'END-of-pmd/Makefile' X# New ports collection makefile for: pmd X# Date created: 2006-06-07 X# Whom: Alex Varju X# X# $FreeBSD$ X# X XPORTNAME= pmd XPORTVERSION= 3.7 XCATEGORIES= devel java XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} XMASTER_SITE_SUBDIR= pmd XDISTNAME= ${PORTNAME}-src-${PORTVERSION} X XMAINTAINER= freebsd-ports@varju.ca XCOMMENT= Static analysis tool for Java source code X XBUILD_DEPENDS= ${JAVALIBDIR}/junit.jar:${PORTSDIR}/java/junit X XUSE_ZIP= yes XUSE_JAVA= yes XUSE_ANT= yes X XMAKE_ARGS= -cp ${JAVALIBDIR}/junit.jar X X.include X XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} XBUILD_WRKSRC= ${WRKSRC}/bin X X.if !defined(NOPORTDOCS) XPORTDOCS= * X.endif X Xdo-install: X.for script in bgastviewer.sh cpd.sh designer.sh pmd.sh X ${REINPLACE_CMD} -e "s|JAVAJARDIR|${JAVAJARDIR}|" ${INSTALL_WRKSRC}/bin/${script} X.endfor X ${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/bin/bgastviewer.sh ${PREFIX}/bin/bgastviewer X ${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/bin/cpd.sh ${PREFIX}/bin/cpd X ${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/bin/designer.sh ${PREFIX}/bin/pmd_designer X ${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/bin/pmd.sh ${PREFIX}/bin/pmd X ${MKDIR} ${JAVAJARDIR}/pmd X cd ${INSTALL_WRKSRC}/lib \ X && ${FIND} . -type f -exec ${INSTALL_DATA} \{} ${JAVAJARDIR}/pmd/ \; X.if !defined(NOPORTDOCS) X cd ${INSTALL_WRKSRC}/docs \ X && ${FIND} . -type d -exec ${MKDIR} ${DOCSDIR}/\{} \; \ X && ${FIND} . -type f -exec ${INSTALL_DATA} \{} ${DOCSDIR}/\{} \; X.endif X X.include END-of-pmd/Makefile echo x - pmd/distinfo sed 's/^X//' >pmd/distinfo << 'END-of-pmd/distinfo' XMD5 (pmd-src-3.7.zip) = 0d4390017f2467345ca7b91b1437fef9 XSHA256 (pmd-src-3.7.zip) = a35de76cd8049fd91b3c4e2031b7b03f849e03e2facba1e32ea1cb27cacdb5ff XSIZE (pmd-src-3.7.zip) = 10756798 END-of-pmd/distinfo echo x - pmd/pkg-plist sed 's/^X//' >pmd/pkg-plist << 'END-of-pmd/pkg-plist' Xbin/bgastviewer Xbin/cpd Xbin/pmd Xbin/pmd_designer Xshare/java/classes/pmd/jakarta-oro-2.0.8.jar Xshare/java/classes/pmd/jaxen-1.1-beta-7.jar Xshare/java/classes/pmd/pmd-3.7.jar Xshare/java/classes/pmd/pmd-src-3.7.jar Xshare/java/classes/pmd/xercesImpl-2.6.2.jar Xshare/java/classes/pmd/xmlParserAPIs-2.6.2.jar X@dirrm share/java/classes/pmd END-of-pmd/pkg-plist echo x - pmd/pkg-descr sed 's/^X//' >pmd/pkg-descr << 'END-of-pmd/pkg-descr' XPMD scans Java source code and looks for potential problems like: X X * Possible bugs - empty try/catch/finally/switch statements X * Dead code - unused local variables, parameters and private methods X * Suboptimal code - wasteful String/StringBuffer usage X * Overcomplicated expressions - unnecessary if statements, for loops X that could be while loops X * Duplicate code - copied/pasted code means copied/pasted bugs X XWWW: http://pmd.sourceforge.net/ END-of-pmd/pkg-descr exit --- pmd-3.7.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted: