Skip to content

Commit 7453306

Browse files
author
itismadness
committed
Add CodeSniffer, and finish up 0.8.0 release
1 parent 53bdf98 commit 7453306

File tree

3 files changed

+224
-77
lines changed

3 files changed

+224
-77
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ install:
1616

1717
script:
1818
- vendor/bin/phpunit
19+
- vendor/bin/phpcs src -s

phpcs.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Gazelle Standard">
3+
<description>The coding standard for the Gazelle project</description>
4+
5+
<!-- Include the whole PSR-1 standard -->
6+
<rule ref="PSR1"/>
7+
<!-- Include the whole PSR-2 standard -->
8+
<rule ref="PSR2">
9+
<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine"/>
10+
</rule>
11+
12+
<!-- Do not allow trailing whitespace at the end of lines -->
13+
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
14+
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine">
15+
<severity>0</severity>
16+
</rule>
17+
<rule ref="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace">
18+
<severity>0</severity>
19+
</rule>
20+
21+
<rule ref="Generic.Classes.OpeningBraceSameLine"/>
22+
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>
23+
24+
<!-- Ensure that proper line endings are used -->
25+
<rule ref="Generic.Files.LineEndings">
26+
<properties>
27+
<property name="eolChar" value="\n"/>
28+
</properties>
29+
</rule>
30+
31+
<!-- Increase PHPCS/PEAR limit of 85 chars per line to 100 -->
32+
<rule ref="Generic.Files.LineLength">
33+
<properties>
34+
<property name="lineLimit" value="100"/>
35+
<property name="absoluteLineLimit" value="0"/>
36+
</properties>
37+
</rule>
38+
</ruleset>

0 commit comments

Comments
 (0)