|
26 | 26 | <exclude name="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing" />
|
27 | 27 | <!-- Magento 2 still does not strict type arguments of functions. This is why this rule is excluded. -->
|
28 | 28 | <exclude name="Squiz.Commenting.FunctionComment.TypeHintMissing" />
|
29 |
| - <exclude-pattern>*.p?html</exclude-pattern> |
30 | 29 | </rule>
|
31 | 30 |
|
32 | 31 | <!-- Import most rules from official Magento2 coding standard -->
|
|
49 | 48 | <property name="spacingBeforeFirst" value="0"/>
|
50 | 49 | </properties>
|
51 | 50 | </rule>
|
| 51 | + |
| 52 | + <!-- |
| 53 | + These sniffs are in the Youwe standard, but should not apply to Magento2 |
| 54 | + templates. |
| 55 | + Because the Magento2 standard tells PHP_CodeSniffer to treat all *.html |
| 56 | + and *.phtml files as PHP files, we need to add <exclude-pattern> |
| 57 | + directives to specifically stop these sniffs from applying to Magento |
| 58 | + template files. We can't use a single <exclude-pattern> directive in the |
| 59 | + <rule ref="Youwe"> block above, as that would also apply to any sniffs |
| 60 | + which are in both standards. |
| 61 | + And XML files are excluded here too. |
| 62 | + --> |
| 63 | + <rule ref="Generic.Commenting.DocComment"><exclude-pattern>*.(x|p?ht)ml$</exclude-pattern></rule> |
| 64 | + <rule ref="Generic.PHP.DisallowAlternativePHPTags"><exclude-pattern>*.(x|p?ht)ml$</exclude-pattern></rule> |
| 65 | + <rule ref="PSR12.ControlStructures.BooleanOperatorPlacement"><exclude-pattern>*.(x|p?ht)ml$</exclude-pattern></rule> |
| 66 | + <rule ref="PSR12.ControlStructures.ControlStructureSpacing"><exclude-pattern>*.(x|p?ht)ml$</exclude-pattern></rule> |
| 67 | + <rule ref="PSR12.Files.DeclareStatement"><exclude-pattern>*.(x|p?ht)ml$</exclude-pattern></rule> |
| 68 | + <rule ref="PSR12.Files.FileHeader"><exclude-pattern>*.(x|p?ht)ml$</exclude-pattern></rule> |
| 69 | + <rule ref="PSR12.Traits.UseDeclaration"><exclude-pattern>*.(x|p?ht)ml$</exclude-pattern></rule> |
| 70 | + <rule ref="Squiz.Arrays.ArrayDeclaration"><exclude-pattern>*.(x|p?ht)ml$</exclude-pattern></rule> |
| 71 | + <rule ref="Squiz.Commenting.FunctionComment"><exclude-pattern>*.(x|p?ht)ml$</exclude-pattern></rule> |
| 72 | + <rule ref="Squiz.Commenting.FunctionCommentThrowTag"><exclude-pattern>*.(x|p?ht)ml$</exclude-pattern></rule> |
| 73 | + <rule ref="Squiz.Commenting.VariableComment"><exclude-pattern>*.(x|p?ht)ml$</exclude-pattern></rule> |
| 74 | + <rule ref="Squiz.WhiteSpace.ControlStructureSpacing"><exclude-pattern>*.(x|p?ht)ml$</exclude-pattern></rule> |
| 75 | + <rule ref="Squiz.WhiteSpace.FunctionSpacing"><exclude-pattern>*.(x|p?ht)ml$</exclude-pattern></rule> |
52 | 76 | </ruleset>
|
0 commit comments