Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated project settings

  • Loading branch information...
commit 861ca1f5918f61fd0dc1c6b33b9b6fb253a5ef23 1 parent 85f81c1
Matthew Xi deepwinter authored

Showing 3 changed files with 66 additions and 1 deletion. Show diff stats Hide diff stats

  1. +39 1 build.xml
  2. +6 0 settings/phpcs.xml
  3. +21 0 settings/phpmd.xml
40 build.xml
@@ -22,7 +22,7 @@
22 22 <ant dir="src" target="checkout"/>
23 23 </target>
24 24
25   - <target name="test" depends="clean, prepare, phploc, pdepend"/>
  25 + <target name="test" depends="clean, prepare, phploc, pdepend, phpdoc"/>
26 26
27 27 <target name="clean">
28 28 <delete dir="build"/>
@@ -33,6 +33,7 @@
33 33 <mkdir dir="build/logs"/>
34 34 <mkdir dir="build/pdepend"/>
35 35 <mkdir dir="build/coverage"/>
  36 + <mkdir dir="build/api"/>
36 37 </target>
37 38
38 39 <target name="phploc">
@@ -52,4 +53,41 @@
52 53 </exec>
53 54 </target>
54 55
  56 + <target name="phpdoc">
  57 + <exec executable="phpdoc">
  58 + <arg value="--directory"/>
  59 + <arg path="${basedir}/src/lattice"/>
  60 + <arg value="--target" />
  61 + <arg path="${basedir}/build/api"/>
  62 + </exec>
  63 + </target>
  64 +
  65 + <target name="phpcpd">
  66 + <exec executable="phpcpd">
  67 + <arg value="--log-pmd"/>
  68 + <arg value="${basedir}/build/logs/pmd-cpd.xml"/>
  69 + <arg path="${basedir}/src/lattice"/>
  70 + </exec>
  71 + </target>
  72 +
  73 + <target name="phpcs">
  74 + <exec executable="phpcs" output="/dev/null">
  75 + <arg value="--report=checkstyle"/>
  76 + <arg value="--report-file=${basedir}/build/logs/checkstyle.xml"/>
  77 + <arg value="--standard=${basedir}/settings/phpcs.xml"/>
  78 + <arg path="${basedir}/src/lattic"/>
  79 + </exec>
  80 + </target>
  81 +
  82 + <target name="phpmd"
  83 + description="Perform project mess detection using PHPMD">
  84 + <exec executable="phpmd">
  85 + <arg path="${basedir}/src/lattice/" />
  86 + <arg value="xml" />
  87 + <arg value="${basedir}/settings/phpmd.xml" />
  88 + <arg value="--reportfile" />
  89 + <arg value="${basedir}/build/logs/pmd.xml" />
  90 + </exec>
  91 + </target>
  92 +
55 93 </project>
6 settings/phpcs.xml
... ... @@ -0,0 +1,6 @@
  1 +<?xml version="1.0"?>
  2 +<ruleset name="RuleSet">
  3 + <rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
  4 + <rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
  5 + <rule ref="Generic.WhiteSpace.ScopeIndent"/>
  6 + </ruleset>
21 settings/phpmd.xml
... ... @@ -0,0 +1,21 @@
  1 +<?xml version="1.0"?>
  2 +
  3 +<ruleset name="MyRuleset"
  4 + xmlns="http://pmd.sf.net/ruleset/1.0.0"
  5 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  6 + xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
  7 + xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
  8 + <description>My rule set for PHPMD</description>
  9 +
  10 + <rule ref="rulesets/codesize.xml/CyclomaticComplexity" />
  11 + <rule ref="rulesets/codesize.xml/NPathComplexity" />
  12 +
  13 + <rule ref="rulesets/design.xml/EvalExpression" />
  14 + <rule ref="rulesets/design.xml/ExitExpression" />
  15 + <rule ref="rulesets/design.xml/GotoStatement" />
  16 +
  17 + <rule ref="rulesets/unusedcode.xml/UnusedFormalParameter" />
  18 + <rule ref="rulesets/unusedcode.xml/UnusedLocalVariable" />
  19 + <rule ref="rulesets/unusedcode.xml/UnusedPrivateField" />
  20 + <rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod" />
  21 +</ruleset>

0 comments on commit 861ca1f

Please sign in to comment.
Something went wrong with that request. Please try again.