#!/bin/sh
PREFIX=_PREFIX_
if [ $# -ne 3 ]; then
	echo "Usage $0 source.java format rule"
	echo " format: html, text, xml"
	echo " rules: basic, braces, clone, codesize, controversial, coupling, design, favorites, finalizers, imports, javabeans, junit, naming, newrules, scratchpad, strictexception, strings, unusedcode"
else
	RULE=${PREFIX}/share/pmd/${3}.xml
	java -classpath ${PREFIX}/share/java/xml-apis.jar:${PREFIX}/share/java/xercesImpl.jar:${PREFIX}/share/java/saxpath.jar:${PREFIX}/share/java/jaxen-core.jar:${PREFIX}/share/java/pmd.jar net.sourceforge.pmd.PMD $1 $2 ${RULE}
fi

