mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-06-16 09:41:46 +02:00
Update phpcs ruleset to use PSR-12 as a base
This commit is contained in:
parent
40efa2e3a5
commit
467818a49d
|
@ -32,7 +32,6 @@ before_script:
|
|||
- if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:3.x-dev --no-update; fi
|
||||
- if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:3.x-dev --no-update; fi
|
||||
- composer require silverstripe/recipe-core:5.x-dev silverstripe/admin:2.x-dev silverstripe/versioned:2.x-dev --no-update
|
||||
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
|
||||
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
||||
|
||||
script:
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
"silverstripe/vendor-plugin": "^1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7"
|
||||
"phpunit/phpunit": "^7",
|
||||
"squizlabs/php_codesniffer": "3.x-dev"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -43,8 +44,8 @@
|
|||
}
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "phpcs code/ tests/",
|
||||
"lint-clean": "phpcbf code/ tests/"
|
||||
"lint": "vendor/bin/phpcs src/ tests/",
|
||||
"lint-clean": "vendor/bin/phpcbf src/ tests/"
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
|
|
|
@ -2,21 +2,10 @@
|
|||
<ruleset name="SilverStripe">
|
||||
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description>
|
||||
|
||||
<!-- base rules are PSR-2 -->
|
||||
<rule ref="PSR2" >
|
||||
<!-- base rules are PSR-12 -->
|
||||
<rule ref="PSR12" >
|
||||
<!-- Current exclusions -->
|
||||
<exclude name="PSR1.Methods.CamelCapsMethodName" />
|
||||
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />
|
||||
<exclude name="PSR2.Classes.PropertyDeclaration" />
|
||||
<exclude name="PSR2.ControlStructures.SwitchDeclaration" /> <!-- causes php notice while linting -->
|
||||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenercase" />
|
||||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenerdefault" />
|
||||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.TerminatingComment" />
|
||||
<exclude name="PSR2.Methods.MethodDeclaration.Underscore" />
|
||||
<exclude name="Squiz.Scope.MethodScope" />
|
||||
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
|
||||
<exclude name="Generic.Files.LineLength.TooLong" />
|
||||
<exclude name="PEAR.Functions.ValidDefaultValue.NotAtEnd" />
|
||||
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
|
||||
</rule>
|
||||
</ruleset>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user