Skip to content

Commit

Permalink
Merge pull request Automattic#461 from roots/revert-455-log1x-phpcs
Browse files Browse the repository at this point in the history
Revert "Use inline phpcs rules instead of phpcs.xml"
  • Loading branch information
swalkinshaw authored Aug 7, 2019
2 parents d9700df + 377d4b1 commit 6d84681
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"php -r \"copy('.env.example', '.env');\""
],
"test": [
"phpcs --ignore=vendor,web --extensions=php --standard=PSR12 --exclude=PSR1.Files.SideEffects ."
"phpcs"
]
}
}
23 changes: 23 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<ruleset name="Roots">
<description>Roots Coding Standards</description>

<!-- Scan all files in directory -->
<file>.</file>

<!-- Scan only PHP files -->
<arg name="extensions" value="php"/>

<!-- Ignore WordPress and Composer dependencies -->
<exclude-pattern>web/wp</exclude-pattern>
<exclude-pattern>vendor/</exclude-pattern>

<!-- Show colors in console -->
<arg value="-colors"/>

<!-- Show sniff codes in all reports -->
<arg value="ns"/>

<!-- Use PSR-2 as a base -->
<rule ref="PSR2"/>
</ruleset>

0 comments on commit 6d84681

Please sign in to comment.