|
| 1 | +<?xml version="1.0"?> |
| 2 | +<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="FigLabCodingStandard"> |
| 3 | + <description>The FIGLAB coding standard for Laravel applications.</description> |
| 4 | + |
| 5 | + <!-- Use colors in output --> |
| 6 | + <arg name="colors"/> |
| 7 | + |
| 8 | + <!-- Show progress of the run --> |
| 9 | + <arg value="p"/> |
| 10 | + |
| 11 | + <!-- Show sniff codes in all reports --> |
| 12 | + <arg value="s"/> |
| 13 | + |
| 14 | + <!-- Wider report display --> |
| 15 | + <arg name="report-width" value="160"/> |
| 16 | + |
| 17 | + <!-- Include all rules from the IxDF Coding Standard --> |
| 18 | + <rule ref="IxDFCodingStandard"/> |
| 19 | + |
| 20 | + <!-- Custom rules --> |
| 21 | + <rule ref="SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable"> |
| 22 | + <exclude-pattern>*/*.blade.php</exclude-pattern> |
| 23 | + <exclude-pattern>./tests*</exclude-pattern> |
| 24 | + </rule> |
| 25 | + |
| 26 | + <rule ref="Generic.Files.LineLength"> |
| 27 | + <exclude-pattern>*/*.blade.php</exclude-pattern> |
| 28 | + <exclude-pattern>./config/*.php</exclude-pattern> |
| 29 | + <exclude-pattern>./database/*.php</exclude-pattern> |
| 30 | + <exclude-pattern>./lang/*.php</exclude-pattern> |
| 31 | + <exclude-pattern>./routes/*.php</exclude-pattern> |
| 32 | + <exclude-pattern>./tests/*.php</exclude-pattern> |
| 33 | + |
| 34 | + <properties> |
| 35 | + <property name="lineLimit" value="160"/> |
| 36 | + <property name="absoluteLineLimit" value="200"/> |
| 37 | + <property name="ignoreComments" value="true"/> |
| 38 | + </properties> |
| 39 | + </rule> |
| 40 | + |
| 41 | + <!-- We are not using static closures --> |
| 42 | + <rule ref="SlevomatCodingStandard.Functions.StaticClosure.ClosureNotStatic"> |
| 43 | + <exclude-pattern>./</exclude-pattern> |
| 44 | + </rule> |
| 45 | + |
| 46 | + <rule ref="IxDFCodingStandard.Laravel.NonExistingBladeTemplate"> |
| 47 | + <exclude-pattern>./</exclude-pattern> |
| 48 | + </rule> |
| 49 | + |
| 50 | + <!-- We are not yet ready to commit to classes to be final. --> |
| 51 | + <rule ref="SlevomatCodingStandard.Classes.RequireAbstractOrFinal.ClassNeitherAbstractNorFinal"> |
| 52 | + <exclude-pattern>./</exclude-pattern> |
| 53 | + </rule> |
| 54 | + |
| 55 | + <!-- Only allow in providers, used mostly in Filament providers. --> |
| 56 | + <rule ref="SlevomatCodingStandard.Functions.DisallowNamedArguments.DisallowedNamedArgument"> |
| 57 | + <exclude-pattern>./bootstrap/*.php</exclude-pattern> |
| 58 | + <exclude-pattern>*/*Provider.php</exclude-pattern> |
| 59 | + </rule> |
| 60 | + |
| 61 | + <!-- Only allow in providers, because boot() and register() methods are sometimes empty. --> |
| 62 | + <rule ref="SlevomatCodingStandard.Functions.DisallowEmptyFunction.EmptyFunction"> |
| 63 | + <exclude-pattern>*/*Provider.php</exclude-pattern> |
| 64 | + </rule> |
| 65 | + |
| 66 | + <!-- We will allow some level of complexity in providers, because some of them come from 3rd party packages. --> |
| 67 | + <rule ref="SlevomatCodingStandard.Complexity.Cognitive.ComplexityTooHigh"> |
| 68 | + <exclude-pattern>*/*Provider.php</exclude-pattern> |
| 69 | + </rule> |
| 70 | +</ruleset> |
0 commit comments