|
1 | 1 | <?xml version="1.0"?> |
2 | 2 | <ruleset name="GreynoiseLaravel"> |
3 | | - <description>Greynoise Laravel 5 standard for PHP_CodeSniffer.</description> |
4 | | - <arg name="tab-width" value="4"/> |
5 | | - <!-- Include the whole PSR-2 standard --> |
6 | | - <rule ref="PSR2"/> |
7 | | - |
8 | | - <!-- |
9 | | - Files MUST have a doc block comment. |
10 | | - Checks file comment tag format and order. |
11 | | - --> |
12 | | - <rule ref="GreynoiseLaravel.Commenting.FileComment"> |
13 | | - <properties> |
14 | | - <property name="error" value="true"/> |
15 | | - </properties> |
16 | | - </rule> |
17 | | - <!-- |
18 | | - Classes MUST have a doc block comment. |
19 | | - --> |
20 | | - <rule ref="Squiz.Commenting.ClassComment"/> |
21 | | - <!-- |
22 | | - Checks class comment tag format and order. |
23 | | - --> |
24 | | - <rule ref="GreynoiseLaravel.Commenting.ClassComment"/> |
25 | | - <!-- |
26 | | - Allow class tags. |
27 | | - --> |
28 | | - <rule ref="Squiz.Commenting.ClassComment.TagNotAllowed"> |
29 | | - <severity>0</severity> |
30 | | - </rule> |
31 | | - <!-- |
32 | | - Properties MUST have a doc block comment. |
33 | | - --> |
34 | | - <rule ref="Squiz.Commenting.VariableComment"/> |
35 | | - <!-- |
36 | | - Methods and functions MUST have a doc block comment. |
37 | | - --> |
38 | | - <rule ref="Squiz.Commenting.FunctionComment"/> |
39 | | - <rule ref="Squiz.Commenting.FunctionComment.ParamCommentFullStop"> |
40 | | - <severity>0</severity> |
41 | | - </rule> |
42 | | - <!-- |
43 | | - Doc block comment alignment. |
44 | | - --> |
45 | | - <rule ref="Squiz.Commenting.DocCommentAlignment"/> |
46 | | - <!-- |
47 | | - Warn about //... comments after statments. |
48 | | - --> |
49 | | - <rule ref="Squiz.Commenting.PostStatementComment"> |
50 | | - <type>warning</type> |
51 | | - <exclude phpcbf-only="true" name="Squiz.Commenting.PostStatementComment.Found"/> |
52 | | - </rule> |
53 | | - <!-- |
54 | | - Change the error message. |
55 | | - --> |
56 | | - <rule ref="Squiz.Commenting.PostStatementComment.Found"> |
57 | | - <message>Comments should not appear after statements</message> |
58 | | - </rule> |
59 | | - <!-- |
60 | | - Doc block comment format and spacing. |
61 | | - --> |
62 | | - <rule ref="Generic.Commenting.DocComment"/> |
63 | | - |
64 | | - <!-- |
65 | | - Warning for todo items. |
66 | | - --> |
67 | | - <rule ref="Generic.Commenting.Todo"/> |
68 | | - |
69 | | - <!-- |
70 | | - Checks array bracket spaces. |
71 | | - --> |
72 | | - <rule ref="Squiz.Arrays.ArrayBracketSpacing"/> |
73 | | - <!-- |
74 | | - Check array declaration, indentation, alignment and that the last item |
75 | | - has a trailing comma. |
76 | | - Checks arrays are declared as "[]" not "array()". |
77 | | - --> |
78 | | - <rule ref="GreynoiseLaravel.Arrays.ArrayDeclaration"/> |
79 | | - <!-- |
80 | | - Checks statments on subsequent lines are aligned. (line up the "="). |
81 | | - --> |
82 | | - <rule ref="Generic.Formatting.MultipleStatementAlignment"> |
83 | | - <properties> |
84 | | - <property name="error" value="true"/> |
85 | | - </properties> |
86 | | - </rule> |
| 3 | + <description>Greynoise Laravel 5 standard for PHP_CodeSniffer.</description> |
| 4 | + <arg name="tab-width" value="4"/> |
| 5 | + <exclude-pattern>*/config/*</exclude-pattern> |
| 6 | + <exclude-pattern>*/cache/*</exclude-pattern> |
| 7 | + <exclude-pattern>*/database/*</exclude-pattern> |
| 8 | + <exclude-pattern>*/docs/*</exclude-pattern> |
| 9 | + <exclude-pattern>*/migrations/*</exclude-pattern> |
| 10 | + <exclude-pattern>*/public/index.php</exclude-pattern> |
| 11 | + <exclude-pattern>*/vendor/*</exclude-pattern> |
| 12 | + <exclude-pattern>*/storage/*</exclude-pattern> |
| 13 | + <exclude-pattern>*/*.blade.php</exclude-pattern> |
| 14 | + <exclude-pattern>*/*.css</exclude-pattern> |
| 15 | + <exclude-pattern>*/*.js</exclude-pattern> |
| 16 | + <exclude-pattern>*/*.xml</exclude-pattern> |
| 17 | + <exclude-pattern>*/autoload.php</exclude-pattern> |
| 18 | + <!-- Include the whole PSR-2 standard --> |
| 19 | + <rule ref="PSR2"/> |
| 20 | + <!-- |
| 21 | + Files MUST have a doc block comment. |
| 22 | + Checks file comment tag format and order. |
| 23 | + --> |
| 24 | + <rule ref="GreynoiseLaravel.Commenting.FileComment"> |
| 25 | + <properties> |
| 26 | + <property name="error" value="true"/> |
| 27 | + </properties> |
| 28 | + </rule> |
| 29 | + <!-- |
| 30 | + Classes MUST have a doc block comment. |
| 31 | + --> |
| 32 | + <rule ref="Squiz.Commenting.ClassComment"/> |
| 33 | + <!-- |
| 34 | + Checks class comment tag format and order. |
| 35 | + --> |
| 36 | + <rule ref="GreynoiseLaravel.Commenting.ClassComment"/> |
| 37 | + <!-- |
| 38 | + Allow class tags. |
| 39 | + --> |
| 40 | + <rule ref="Squiz.Commenting.ClassComment.TagNotAllowed"> |
| 41 | + <severity>0</severity> |
| 42 | + </rule> |
| 43 | + <!-- |
| 44 | + Properties MUST have a doc block comment. |
| 45 | + --> |
| 46 | + <rule ref="Squiz.Commenting.VariableComment"/> |
| 47 | + <!-- |
| 48 | + Methods and functions MUST have a doc block comment. |
| 49 | + --> |
| 50 | + <rule ref="Squiz.Commenting.FunctionComment"/> |
| 51 | + <rule ref="Squiz.Commenting.FunctionComment.ParamCommentFullStop"> |
| 52 | + <severity>0</severity> |
| 53 | + </rule> |
| 54 | + <!-- |
| 55 | + Doc block comment alignment. |
| 56 | + --> |
| 57 | + <rule ref="Squiz.Commenting.DocCommentAlignment"/> |
| 58 | + <!-- |
| 59 | + Warn about //... comments after statments. |
| 60 | + --> |
| 61 | + <rule ref="Squiz.Commenting.PostStatementComment"> |
| 62 | + <type>warning</type> |
| 63 | + <exclude phpcbf-only="true" name="Squiz.Commenting.PostStatementComment.Found"/> |
| 64 | + </rule> |
| 65 | + <!-- |
| 66 | + Change the error message. |
| 67 | + --> |
| 68 | + <rule ref="Squiz.Commenting.PostStatementComment.Found"> |
| 69 | + <message>Comments should not appear after statements</message> |
| 70 | + </rule> |
| 71 | + <!-- |
| 72 | + Doc block comment format and spacing. |
| 73 | + --> |
| 74 | + <rule ref="Generic.Commenting.DocComment"/> |
| 75 | + <!-- |
| 76 | + Warning for todo items. |
| 77 | + --> |
| 78 | + <rule ref="Generic.Commenting.Todo"/> |
| 79 | + <!-- |
| 80 | + Checks array bracket spaces. |
| 81 | + --> |
| 82 | + <rule ref="Squiz.Arrays.ArrayBracketSpacing"/> |
| 83 | + <!-- |
| 84 | + Check array declaration, indentation, alignment and that the last item |
| 85 | + has a trailing comma. |
| 86 | + Checks arrays are declared as "[]" not "array()". |
| 87 | + --> |
| 88 | + <rule ref="GreynoiseLaravel.Arrays.ArrayDeclaration"/> |
| 89 | + <!-- |
| 90 | + Checks statments on subsequent lines are aligned. (line up the "="). |
| 91 | + --> |
| 92 | + <!-- <rule ref="Generic.Formatting.MultipleStatementAlignment"> |
| 93 | + <properties> |
| 94 | + <property name="error" value="true"/> |
| 95 | + </properties> |
| 96 | + </rule> --> |
| 97 | + <!-- |
| 98 | + Checks tabs are not used in alignment. |
| 99 | + --> |
| 100 | + <rule ref="GreynoiseLaravel.WhiteSpace.DisallowTabsInAlignment"/> |
87 | 101 | </ruleset> |
0 commit comments