Skip to content

Commit

Permalink
Merge branch 'feature/build-file' into 'master'
Browse files Browse the repository at this point in the history
Feature/build file

You like?

See merge request !1
  • Loading branch information
Jaap van Otterdijk committed Mar 20, 2015
2 parents 2caf46b + bc5dcaf commit 54b70d2
Show file tree
Hide file tree
Showing 5 changed files with 251 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor/
build/
vendor/
41 changes: 41 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="polderknowledge/coding-standards" default="build" basedir=".">
<property name="bindir" value="${project.basedir}/vendor/bin" override="true" />
<property name="builddir" value="${project.basedir}/build" override="true" />
<property name="fileset" value="source" override="true"/>

<fileset id="source" dir="${project.basedir}/PolderKnowledge/Sniffs">
<include name="**/*.php" />
</fileset>

<target name="clean">
<delete dir="${builddir}" includeemptydirs="true" verbose="true" failonerror="false" />
</target>

<target name="prepare">
<mkdir dir="${builddir}" />
</target>

<target name="build" depends="prepare, checksyntax, checkstyle" />

<target name="checksyntax" depends="prepare">
<phplint>
<fileset dir="${project.basedir}">
<include name="PolderKnowledge/**/*.php" />
<exclude name="**/vendor/**" />
</fileset>
</phplint>
</target>

<target name="checkstyle" depends="prepare">
<phpcodesniffer
standard="${project.basedir}/ruleset.xml"
format="summary"
skipversioncheck="true">
<fileset refid="${fileset}" />

<formatter type="full" usefile="false"/>
<formatter type="checkstyle" outfile="${builddir}/checkstyle-codesniffer.xml"/>
</phpcodesniffer>
</target>
</project>
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"name": "polderknowledge/coding-standards"
"name": "polderknowledge/coding-standards",
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phing/phing": "~2.10",
"squizlabs/php_codesniffer": "~2.3"
}
}
184 changes: 184 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions ruleset.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<ruleset>
<description>The Polder Knowledge coding standards.</description>

<rule ref="./PolderKnowledge/ruleset.xml" />

<!-- Disabled since CodeSniffer expects the currently used class names. -->
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
<severity>0</severity>
</rule>

<!-- Disabled since CodeSniffer does not support namespaces. -->
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<severity>0</severity>
</rule>
</ruleset>

0 comments on commit 54b70d2

Please sign in to comment.