Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bfcb6ec
commit f3eaf7b
Showing
11 changed files
with
331 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
version=0.0.0 | ||
commit="none" | ||
name=${phing.project.name} | ||
summary="Summary" | ||
author.name="Dan Kempster" | ||
author.email="dev@dankempster.co.uk" | ||
author.username="dankempster" | ||
description="Description last commit ${commit}" | ||
|
||
global.vendor.bin=/Users/dan/.composer/vendor/bin | ||
global.bin=/usr/bin | ||
|
||
exec.php=${global.bin}/php | ||
exec.phing=${global.vendor.bin}/phing | ||
exec.phpdepend=${global.vendor.bin}/pdepend | ||
exec.phpcs=${global.vendor.bin}/phpcs | ||
exec.phpunit=${project.bin}/phpunit | ||
exec.phpmd=${global.vendor.bin}/phpmd | ||
exec.phpcpd=${global.vendor.bin}/phpcpd | ||
exec.phpdoc=${global.vendor.bin}/phpdoc | ||
exec.phpdox=${global.bin}/phpdox | ||
exec.phploc=${global.vendor.bin}/phploc | ||
|
||
project.src=${project.basedir}/src | ||
project.tests=${project.basedir}/tests | ||
project.vendor=${project.basedir}/src | ||
project.bin=${project.basedir}/bin | ||
project.docs=${project.basedir}/docs | ||
project.docs.api=${project.docs}/api | ||
|
||
build.root=${project.basedir}/build | ||
build.cache=${build.root}/cache | ||
build.tmp=${build.root}/tmp | ||
build.log=${build.root}/log | ||
build.html=${build.root}/html | ||
build.config=${build.root}/config | ||
build.resources=${build.root}/resources | ||
|
||
phpdepend.xml.file=${build.log}/phpdepend.xml | ||
phpdepend.html=${build.html} | ||
phpdepend.ignore=.git,tests/,build/ | ||
|
||
phpcs.xml.file=${build.log}/phpcs.xml | ||
phpcs.html=${build.html}/phpcs | ||
|
||
phpunit.html=${build.html}/phpunit | ||
phpunit.config=${project.basedir}/phpunit.xml.dist | ||
phpunit.phing.config=${project.basedir}/phpunit.phing.xml | ||
|
||
phpmd.config=${build.config}/phpmd.xml | ||
phpmd.report.html=${build.html}/pmd.html | ||
phpmd.report.text=${build.html}/pmd.txt | ||
phpmd.report.xml=${build.log}/pmd.xml | ||
|
||
phpcpd.log.file=${build.log}/phpcpd.xml | ||
phpcpd.html=${build.html}/phpcpd | ||
|
||
phploc.log.file=${build.log}/phploc.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
<project name="Axstrad/Content" default="all" basedir="."> | ||
<property file="./build.properties"/> | ||
|
||
<target name="prepare" depends="clean"> | ||
<mkdir dir="${build.tmp}"/> | ||
<mkdir dir="${build.log}"/> | ||
<mkdir dir="${build.cache}"/> <!-- Should NOT be part of 'clean' target --> | ||
<mkdir dir="${build.html}"/> | ||
</target> | ||
|
||
<target name="clean"> | ||
<delete dir="${build.tmp}"/> | ||
<delete dir="${build.log}"/> | ||
<delete dir="${build.html}"/> | ||
</target> | ||
|
||
<target name="phpdepend-human" | ||
description="Calculate software metrics using PHP_Depend and log result in XML format." | ||
> | ||
<mkdir dir="${build.html}"/> | ||
<exec | ||
command="${exec.phpdepend} --jdepend-chart=${build.html}/pdepend.svg --ignore=${phpdepend.ignore} --overview-pyramid=${build.html}/pyramid.svg ${project.src}" | ||
dir="${project.src}" | ||
passthru="true" | ||
/> | ||
</target> | ||
|
||
<target name="phpdepend-ci" | ||
depends="phpdepend-human" | ||
description="Calculate software metrics using PHP_Depend and log result in XML format. Intended for usage within a continuous integration environment." | ||
> | ||
<exec | ||
command="${exec.phpdepend} --jdepend-xml=${phpdepend.xml.file} --ignore=${phpdepend.ignore} ${project.src}" | ||
dir="${project.src}" | ||
passthru="true" | ||
/> | ||
</target> | ||
|
||
<target name="phpcs"> | ||
<mkdir dir="${phpcs.html}"/> | ||
<exec | ||
command="${exec.phpcs} --report=checkstyle --report-file=${phpcs.xml.file} --standard=PEAR --extensions=php --ignore=.git/,doc/,resources/,build ${project.src}" | ||
dir="${project.basedir}" | ||
passthru="true" | ||
/> | ||
</target> | ||
|
||
<target name="phpunit" | ||
description="Runs the project's PHPUnit tests. Intended for use in a Continuous Integration environment." | ||
> | ||
<mkdir dir="${phpunit.html}"/> | ||
<xslt | ||
file="${phpunit.config}" | ||
tofile="${phpunit.phing.config}" | ||
style="${build.resources}/phpunit-phing.xslt" | ||
/> | ||
<exec | ||
command="${exec.phpunit} -c ${phpunit.phing.config}" | ||
dir="${project.basedir}" | ||
passthru="true" | ||
/> | ||
</target> | ||
|
||
<target name="phpmd" | ||
description="Intended for use by the command line before committing." | ||
> | ||
<exec | ||
command="${exec.phpmd} ${project.src} text ${phpmd.config}" | ||
dir="${project.basedir}" | ||
passthru="true" | ||
/> | ||
</target> | ||
|
||
<target name="phpmd-report" | ||
description="Runs PHPMD against the project and outputs HTML and XML reports. Intended for internal use." | ||
depends="phpmd-html,phpmd-xml" | ||
/> | ||
|
||
<target name="phpmd-html" | ||
> | ||
<exec | ||
command="${exec.phpmd} ${project.src} html ${phpmd.config} --reportfile ${phpmd.report.html} --suffixes=php" | ||
dir="${project.basedir}" | ||
passthru="true" | ||
/> | ||
</target> | ||
|
||
<target name="phpmd-xml" | ||
description="Runs PHPMD against the project and outputs HTML and XML reports. Intended for by a Continuous Integration environment." | ||
> | ||
<exec | ||
command="${exec.phpmd} ${project.src} xml ${phpmd.config} --reportfile ${phpmd.report.xml} --suffixes=php" | ||
dir="${project.basedir}" | ||
passthru="true" | ||
/> | ||
</target> | ||
|
||
<target name="phpcpd" | ||
description="Find duplicate code using PHPCPD and print human readable output. Intended for usage on the command line before committing." | ||
> | ||
<exec | ||
command="${exec.phpcpd} --verbose ${project.src}" | ||
dir="${project.basedir}" | ||
passthru="true" | ||
/> | ||
</target> | ||
|
||
<target name="phpcpd-ci" | ||
description="Find duplicate code using PHPCPD and log result in XML format. Intended for usage within a continuous integration environment." | ||
> | ||
<exec | ||
command="${exec.phpcpd} --log-pmd ${phpcpd.log.file} --verbose ${project.src}" | ||
dir="${project.basedir}" | ||
passthru="true" | ||
/> | ||
</target> | ||
|
||
<target name="phploc" | ||
description="Measure project size using PHPLOC and print human readable output. Intended for usage from the command line before committing." | ||
> | ||
<exec | ||
command="${exec.phploc} ${project.src} ${project.tests}" | ||
dir="${project.basedir}" | ||
passthru="true" | ||
/> | ||
</target> | ||
|
||
<target name="phploc-ci" | ||
description="Measure project size using PHPLOC and log result in CSV and XML format. Intended for usage within a continuous integration environment." | ||
> | ||
<exec | ||
command="${exec.phploc} --count-tests --log-xml ${phploc.log.file} ${project.src} ${project.tests} > ${build.html}/phploc.txt" | ||
dir="${project.basedir}" | ||
passthru="true" | ||
/> | ||
</target> | ||
|
||
<target name="phpdox" depends="phpunit,phploc-ci,phpcs,phpmd-xml"> | ||
<exec | ||
command="${exec.phpdox}" | ||
dir="${project.basedir}" | ||
passthru="true" | ||
/> | ||
</target> | ||
|
||
<target name="all" depends="clean, build, report, ci-tasks"/> | ||
|
||
<!-- Intedned for use by humans --> | ||
<target name="build" depends="prepare, test"/> | ||
<target name="test" depends="prepare, phpunit"/> | ||
<target name="report" depends="build, phploc, phpdepend-human, phpcs, phpmd-html, phpcpd, phpdox"/> | ||
|
||
<!-- Intended for use by Continuous Integration environments --> | ||
<target name="ci" depends="clean, ci-tasks"/> | ||
<target name="ci-tasks" depends="test, phploc-ci, phpdepend-ci, phpcs, phpmd-xml, phpcpd-ci, phpdox"/> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | ||
<xsl:output method="xml" indent="yes"/> | ||
|
||
<xsl:template match="phpunit"> | ||
<phpunit> | ||
<xsl:copy-of select="testsuites" /> | ||
|
||
<logging> | ||
<!-- Apply other templates to the logging/log nodes (including the commented out ones) --> | ||
<xsl:apply-templates select="logging/node()"/> | ||
</logging> | ||
|
||
<xsl:copy-of select="filter" /> | ||
</phpunit> | ||
</xsl:template> | ||
|
||
<!-- Matches the commented out <log type="coverage-xml"> line and outputs it --> | ||
<xsl:template match="comment()[contains(., 'coverage-xml') or contains(., 'coverage-html')]"> | ||
<xsl:value-of select="." disable-output-escaping="yes"/> <!-- uncomments the log line --> | ||
</xsl:template> | ||
|
||
<!-- Matches all uncomments <log /> elements and outputs them --> | ||
<!--<xsl:template match="log"> | ||
<xsl:copy-of select="." /> | ||
</xsl:template>--> | ||
</xsl:transform> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<phpdox xmlns="http://phpdox.net/config"> | ||
<project name="axstrad/content" source="src" workdir="build/cache/phpdox"> | ||
<collector publiconly="false"> | ||
<include mask="*.php" /> | ||
|
||
<inheritance resolve="true"> | ||
|
||
</inheritance> | ||
</collector> | ||
|
||
<generator output="build/html"> | ||
<build engine="html" enabled="true" output="api"> | ||
<file extension="html" /> | ||
</build> | ||
|
||
<enrich base="build/log"> | ||
<source type="phploc"> | ||
<file name="phploc.xml"></file> | ||
</source> | ||
|
||
<source type="git"> | ||
<git binary="/usr/bin/git" /> | ||
<history enabled="true" limit="15" cache="${phpDox.project.workdir}/gitlog.xml" /> | ||
</source> | ||
|
||
<source type="phpunit"> | ||
<coverage path="phpunit-coverage"/> | ||
</source> | ||
|
||
<source type="phpcs"> | ||
<file name="phpcs.xml" /> | ||
</source> | ||
|
||
<source type="pmd"> | ||
<file name="pmd.xml" /> | ||
</source> | ||
</enrich> | ||
</generator> | ||
</project> | ||
</phpdox> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<ruleset name="name-of-your-coding-standard" | ||
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>Description of your coding standard</description> | ||
|
||
<rule ref="rulesets/codesize.xml/CyclomaticComplexity" /> | ||
<!-- ... --> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters