Permalink
Browse files

Updated project settings

  • Loading branch information...
1 parent 85f81c1 commit 861ca1f5918f61fd0dc1c6b33b9b6fb253a5ef23 @deepwinter deepwinter committed Nov 9, 2011
Showing with 66 additions and 1 deletion.
  1. +39 −1 build.xml
  2. +6 −0 settings/phpcs.xml
  3. +21 −0 settings/phpmd.xml
View
40 build.xml
@@ -22,7 +22,7 @@
<ant dir="src" target="checkout"/>
</target>
- <target name="test" depends="clean, prepare, phploc, pdepend"/>
+ <target name="test" depends="clean, prepare, phploc, pdepend, phpdoc"/>
<target name="clean">
<delete dir="build"/>
@@ -33,6 +33,7 @@
<mkdir dir="build/logs"/>
<mkdir dir="build/pdepend"/>
<mkdir dir="build/coverage"/>
+ <mkdir dir="build/api"/>
</target>
<target name="phploc">
@@ -52,4 +53,41 @@
</exec>
</target>
+ <target name="phpdoc">
+ <exec executable="phpdoc">
+ <arg value="--directory"/>
+ <arg path="${basedir}/src/lattice"/>
+ <arg value="--target" />
+ <arg path="${basedir}/build/api"/>
+ </exec>
+ </target>
+
+ <target name="phpcpd">
+ <exec executable="phpcpd">
+ <arg value="--log-pmd"/>
+ <arg value="${basedir}/build/logs/pmd-cpd.xml"/>
+ <arg path="${basedir}/src/lattice"/>
+ </exec>
+ </target>
+
+ <target name="phpcs">
+ <exec executable="phpcs" output="/dev/null">
+ <arg value="--report=checkstyle"/>
+ <arg value="--report-file=${basedir}/build/logs/checkstyle.xml"/>
+ <arg value="--standard=${basedir}/settings/phpcs.xml"/>
+ <arg path="${basedir}/src/lattic"/>
+ </exec>
+ </target>
+
+ <target name="phpmd"
+ description="Perform project mess detection using PHPMD">
+ <exec executable="phpmd">
+ <arg path="${basedir}/src/lattice/" />
+ <arg value="xml" />
+ <arg value="${basedir}/settings/phpmd.xml" />
+ <arg value="--reportfile" />
+ <arg value="${basedir}/build/logs/pmd.xml" />
+ </exec>
+ </target>
+
</project>
View
6 settings/phpcs.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<ruleset name="RuleSet">
+ <rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
+ <rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
+ <rule ref="Generic.WhiteSpace.ScopeIndent"/>
+ </ruleset>
View
21 settings/phpmd.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+
+<ruleset name="MyRuleset"
+ xmlns="http://pmd.sf.net/ruleset/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+ xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+ <description>My rule set for PHPMD</description>
+
+ <rule ref="rulesets/codesize.xml/CyclomaticComplexity" />
+ <rule ref="rulesets/codesize.xml/NPathComplexity" />
+
+ <rule ref="rulesets/design.xml/EvalExpression" />
+ <rule ref="rulesets/design.xml/ExitExpression" />
+ <rule ref="rulesets/design.xml/GotoStatement" />
+
+ <rule ref="rulesets/unusedcode.xml/UnusedFormalParameter" />
+ <rule ref="rulesets/unusedcode.xml/UnusedLocalVariable" />
+ <rule ref="rulesets/unusedcode.xml/UnusedPrivateField" />
+ <rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod" />
+</ruleset>

0 comments on commit 861ca1f

Please sign in to comment.