mirror of
https://github.com/opdavies/glassboxx-sdk-php.git
synced 2025-02-17 22:50:48 +00:00
Add Psalm for static analysis
This commit is contained in:
parent
73160563b3
commit
ce05172932
4 changed files with 23 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,5 +5,6 @@
|
||||||
!/.gitignore
|
!/.gitignore
|
||||||
!/composer.json
|
!/composer.json
|
||||||
!/Makefile
|
!/Makefile
|
||||||
|
!/psalm.xml
|
||||||
!/src/**
|
!/src/**
|
||||||
!/tests/**
|
!/tests/**
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -1,5 +1,8 @@
|
||||||
.PHONY: *
|
.PHONY: *
|
||||||
|
|
||||||
|
static-code-analysis:
|
||||||
|
php vendor/bin/psalm --show-info=true
|
||||||
|
|
||||||
phpcs:
|
phpcs:
|
||||||
php vendor/bin/phpcs --standard=PSR2 src tests
|
php vendor/bin/phpcs --standard=PSR2 src tests
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,8 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^9.1",
|
"phpunit/phpunit": "^9.1",
|
||||||
"squizlabs/php_codesniffer": "^3.5",
|
"squizlabs/php_codesniffer": "^3.5",
|
||||||
"symfony/var-dumper": "^5.0"
|
"symfony/var-dumper": "^5.0",
|
||||||
|
"vimeo/psalm": "^3.11"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"sort-packages": true
|
"sort-packages": true
|
||||||
|
|
17
psalm.xml
Normal file
17
psalm.xml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<psalm
|
||||||
|
errorLevel="7"
|
||||||
|
findUnusedVariablesAndParams="true"
|
||||||
|
resolveFromConfigFile="true"
|
||||||
|
totallyTyped="true"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="https://getpsalm.org/schema/config"
|
||||||
|
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||||
|
>
|
||||||
|
<projectFiles>
|
||||||
|
<directory name="src" />
|
||||||
|
<ignoreFiles>
|
||||||
|
<directory name="vendor" />
|
||||||
|
</ignoreFiles>
|
||||||
|
</projectFiles>
|
||||||
|
</psalm>
|
Loading…
Add table
Add a link
Reference in a new issue