-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/build-file' into 'master'
Feature/build file You like? See merge request !1
- Loading branch information
Showing
5 changed files
with
251 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/vendor/ | ||
build/ | ||
vendor/ |
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,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> |
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 |
---|---|---|
@@ -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" | ||
} | ||
} |
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,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> |