Skip to content

Commit 43dae6c

Browse files
committed
Ruleset: selectively exclude an errorcode
As of PHPCS 4.0, it is possible to selectively exclude errors from the `PSR12.Files.FileHeader` sniff. This particular exclusion means that we will not enforce a blank line between the PHP open tag and the file docblock, as that would cause a lot of unnecessary code churn in the primary codebases using this ruleset.
1 parent f766a2c commit 43dae6c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

PHPCSDev/ruleset.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
most external standards, adding constant visibility is not (yet) an option. -->
5050
<exclude name="PSR12.Properties.ConstantVisibility"/>
5151

52+
<!-- Allow for file docblock on the line directly following the PHP open tag. -->
53+
<exclude name="PSR12.Files.FileHeader.SpacingAfterTagBlock"/>
54+
5255
<!-- Allow for the first condition of a multi-line control structure to be on the same line
5356
as the control structure keyword. -->
5457
<exclude name="PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine"/>

0 commit comments

Comments
 (0)