Skip to content

Commit

Permalink
Updated project settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins WinterRoot committed Nov 9, 2011
1 parent 85f81c1 commit 861ca1f
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 1 deletion.
40 changes: 39 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand All @@ -33,6 +33,7 @@
<mkdir dir="build/logs"/>
<mkdir dir="build/pdepend"/>
<mkdir dir="build/coverage"/>
<mkdir dir="build/api"/>
</target>

<target name="phploc">
Expand All @@ -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>
6 changes: 6 additions & 0 deletions settings/phpcs.xml
Original file line number Diff line number Diff line change
@@ -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>
21 changes: 21 additions & 0 deletions settings/phpmd.xml
Original file line number Diff line number Diff line change
@@ -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.