TASK: Provide phpcs integration for CGL

Use common accepted PSR2 for CGL checks.
This commit is contained in:
Daniel Siepmann 2017-12-14 22:30:49 +01:00
parent 9b710aa921
commit d1bc4870f7
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 25 additions and 1 deletions

View file

@ -12,9 +12,16 @@
},
"require": {
"php": ">=7.0.0 <=7.2.99",
"typo3/cms-core": ">=8.7.0,<8.9.99"
"typo3/cms-core": "^8.7.0",
"typo3/cms-form": "^8.7.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.2.0"
},
"scripts": {
"lint": [
"./vendor/bin/phpcs"
],
"post-install-cmd": [
"npm install"
]

17
phpcs.xml.dist Normal file
View file

@ -0,0 +1,17 @@
<?xml version="1.0"?>
<ruleset name="cgl">
<description>The coding standard for this extension.</description>
<file>./Classes/</file>
<!-- Set default settings -->
<arg value="sp"/>
<arg name="colors"/>
<arg name="encoding" value="utf-8" />
<arg name="extensions" value="php" />
<rule ref="PSR2">
<!-- As it does not work with new array syntax. -->
<exclude name="Squiz.Arrays.ArrayBracketSpacing.SpaceBeforeBracket" />
</rule>
</ruleset>