Swag: Add custom PHP Codesniffer ruleset

This commit is contained in:
Johannes Meyer 2017-01-27 14:53:54 +01:00
parent 181e2ef05c
commit cd5bc4c4a6
1 changed files with 29 additions and 0 deletions

29
icingaweb2.ruleset.xml Normal file
View File

@ -0,0 +1,29 @@
<!-- PHP Codesniffer ruleset configuration -->
<?xml version="1.0"?>
<ruleset name="icingaweb2">
<description>The default PSR-2 standard with specifically excluded non-critical sniffs</description>
<!-- Include the whole PSR-2 standard -->
<rule ref="PSR2" />
<!-- Exclude patterns for PSR-2 Sniffs -->
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
<exclude-pattern>*/test/php/*</exclude-pattern>
</rule>
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>*/test/php/*</exclude-pattern>
</rule>
<rule ref="PSR2.Namespaces.UseDeclaration.UseAfterNamespace">
<exclude-pattern>*/test/php/*</exclude-pattern>
<exclude-pattern>*/library/Icinga/Test/BaseTestCase.php</exclude-pattern>
</rule>
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>*/application/views/helpers/*</exclude-pattern>
<exclude-pattern>*/library/Icinga/Web/Paginator/ScrollingStyle/SlidingWithBorder.php</exclude-pattern>
</rule>
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
<exclude-pattern>*/application/views/helpers/*</exclude-pattern>
<exclude-pattern>*/library/Icinga/Web/Paginator/ScrollingStyle/SlidingWithBorder.php</exclude-pattern>
</rule>
<rule ref="Generic.Files.LineLength.TooLong">
<exclude-pattern>*/modules/monitoring/library/Monitoring/Backend/Ido/Query/*</exclude-pattern>
</rule>
</ruleset>