Add PHPStan and other quality checks (#185)
* Add PHPStan and other quality checks Similar to FreshRSS core Contributes to https://github.com/FreshRSS/Extensions/issues/184 * Bump versions * markdownlint * Draft of GitHub Actions * Wrong branch * Remove wrong tests * Change path approach * Move checkout * cache-dependency-path * fix rm symbolic * Remove irrelevant tests * Fix composer cache path * Fix hashFiles * fix shell cache
This commit is contained in:
parent
ec9a5903d4
commit
fabd9806af
70 changed files with 1286 additions and 417 deletions
39
phpstan.neon
Normal file
39
phpstan.neon
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
parameters:
|
||||
# TODO: Increase rule-level https://phpstan.org/user-guide/rule-levels
|
||||
level: 1
|
||||
treatPhpDocTypesAsCertain: false
|
||||
fileExtensions:
|
||||
- php
|
||||
- phtml
|
||||
paths:
|
||||
- ../FreshRSS
|
||||
- .
|
||||
excludePaths:
|
||||
analyse:
|
||||
- ../FreshRSS
|
||||
- vendor/
|
||||
analyseAndScan:
|
||||
- .git/
|
||||
- node_modules/
|
||||
- symbolic/
|
||||
- tmp/
|
||||
- xExtension-TTRSS_API/
|
||||
dynamicConstantNames:
|
||||
- TYPE_GIT
|
||||
reportMaybesInPropertyPhpDocTypes: false
|
||||
strictRules:
|
||||
allRules: false
|
||||
booleansInConditions: false # TODO pass
|
||||
closureUsesThis: true
|
||||
disallowedConstructs: false
|
||||
disallowedLooseComparison: false
|
||||
matchingInheritedMethodNames: true
|
||||
noVariableVariables: false # TODO pass
|
||||
numericOperandsInArithmeticOperators: true
|
||||
overwriteVariablesWithLoop: true
|
||||
requireParentConstructorCall: true
|
||||
strictCalls: true
|
||||
switchConditionsMatchingType: true
|
||||
uselessCast: true
|
||||
includes:
|
||||
- vendor/phpstan/phpstan-strict-rules/rules.neon
|
||||
Loading…
Add table
Add a link
Reference in a new issue