-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AD-HOC style (*): Added lint configuration
Recently, there have been a number of changes in the project. Largely, this has been refactoring related, and no actual code changes have taken place. However, it stands to reason that code changes might be introduced in future. This commit adds some configuration to assist in sanity checking these changes to ensure they adhere to known standards, commonly in use across all sitewards projects. :
- Loading branch information
1 parent
5c85e0b
commit 01c393b
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"linters": { | ||
"php": { | ||
"type": "php", | ||
"include": "(\\.(php|phtml)$)" | ||
}, | ||
"phpcs": { | ||
"type": "phpcs", | ||
"bin": "phpcs", | ||
"include": "(\\.(php|phtml)$)", | ||
"phpcs.standard": "phpcs.xml" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="SitewardsStandard"> | ||
<description>Sitewards coding standards.</description> | ||
|
||
<ini name="date.timezone" value="Europe/Berlin" /> | ||
|
||
<rule ref="PSR2" /> | ||
|
||
<rule ref="PSR1.Classes.ClassDeclaration"> | ||
<exclude-pattern>*app/code*</exclude-pattern> | ||
<exclude-pattern>*SitewardsStandard*</exclude-pattern> | ||
</rule> | ||
|
||
<rule ref="Squiz.Classes.ValidClassName"> | ||
<exclude-pattern>*app/code*</exclude-pattern> | ||
<exclude-pattern>*SitewardsStandard*</exclude-pattern> | ||
</rule> | ||
|
||
<rule ref="PSR2.Methods.MethodDeclaration.Underscore"> | ||
<exclude-pattern>*app/code*</exclude-pattern> | ||
<exclude-pattern>*SitewardsStandard*</exclude-pattern> | ||
</rule> | ||
|
||
<!-- Ensure multiple statements that are sequential are aligned --> | ||
<rule ref="Generic.Formatting.MultipleStatementAlignment"/> | ||
|
||
<!-- Ensure there is no superfleus whitespace --> | ||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" /> | ||
</ruleset> |