Updating PHPCS ruleset to match a better style guideline (tab width of 2 and same-line opening braces)
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
@@ -11,7 +11,25 @@
|
|||||||
<arg name="colors"/>
|
<arg name="colors"/>
|
||||||
|
|
||||||
<!-- Set standard coding standard (PSR-12) -->
|
<!-- Set standard coding standard (PSR-12) -->
|
||||||
<rule ref="PSR12"/>
|
<rule ref="PSR12">
|
||||||
|
<!-- Disable PSR-12 rules forcing opening braces onto a new line -->
|
||||||
|
<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine"/>
|
||||||
|
<exclude name="PSR12.Classes.OpeningBraceSpace.Found"/>
|
||||||
|
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnNewLine"/>
|
||||||
|
<exclude name="Generic.Files.LineLength"/>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- Require opening braces to be on the same line (1TBS / K&R style) -->
|
||||||
|
<rule ref="Generic.Classes.OpeningBraceSameLine"/>
|
||||||
|
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>
|
||||||
|
|
||||||
|
<!-- Enforce 2-space indentation instead of 4 -->
|
||||||
|
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
||||||
|
<properties>
|
||||||
|
<property name="indent" value="2"/>
|
||||||
|
<property name="exact" value="true"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
|
||||||
<!-- Exclude third-party vendor files and node_modules -->
|
<!-- Exclude third-party vendor files and node_modules -->
|
||||||
<exclude-pattern>*/vendor/*</exclude-pattern>
|
<exclude-pattern>*/vendor/*</exclude-pattern>
|
||||||
|
|||||||
Reference in New Issue
Block a user