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:
Alexandre Alapetite 2023-11-24 17:04:16 +01:00 committed by GitHub
parent ec9a5903d4
commit fabd9806af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
70 changed files with 1286 additions and 417 deletions

39
phpstan.neon Normal file
View 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