Skip to content

Commit

Permalink
Merge pull request #38 from GaryJones/local-phpcs
Browse files Browse the repository at this point in the history
Allow PHPCS to be run locally.
  • Loading branch information
Potherca authored Sep 18, 2017
2 parents 17130f5 + ca50e1f commit 692daae
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"squizlabs/php_codesniffer": "*"
},
"require-dev": {
"composer/composer": "*"
"composer/composer": "*",
"wimg/php-compatibility": "^8.0"
},
"suggest": {
"dealerdirect/qa-tools": "All the PHP QA tools you'll need"
Expand All @@ -40,5 +41,10 @@
},
"extra": {
"class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
},
"scripts": {
"install-codestandards": [
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
]
}
}
17 changes: 17 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<ruleset name="phpcodesniffer-composer-installer">
<description>Coding standards for PHP_CodeSniffer Standards Composer Installer Plugin</description>

<arg name="extensions" value="php"/>
<!-- Show sniff codes in all reports, and progress when running -->
<arg value="sp"/>

<file>.</file>
<exclude-pattern>*/.github/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>

<rule ref="PHPCompatibility"/>
<config name="testVersion" value="5.3-"/>

<rule ref="PSR2"/>
</ruleset>

0 comments on commit 692daae

Please sign in to comment.