Merge pull request #8547 from kenjis/add-phpmetrics

chore: add PhpMetrics
This commit is contained in:
kenjis 2024-02-21 10:57:05 +09:00 committed by GitHub
commit 4ef8619fef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 1 deletions

View File

@ -90,7 +90,8 @@
},
"scripts": {
"post-update-cmd": [
"CodeIgniter\\ComposerScripts::postUpdate"
"CodeIgniter\\ComposerScripts::postUpdate",
"composer update --working-dir=tools/phpmetrics"
],
"analyze": [
"Composer\\Config::disableProcessTimeout",
@ -109,6 +110,7 @@
"php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.no-header.php",
"php-cs-fixer fix --ansi --verbose --diff"
],
"metrics": "tools/phpmetrics/vendor/bin/phpmetrics --config=phpmetrics.json",
"sa": "@analyze",
"style": "@cs-fix",
"test": "phpunit"
@ -117,6 +119,7 @@
"analyze": "Run static analysis",
"cs": "Check the coding style",
"cs-fix": "Fix the coding style",
"metrics": "Run PhpMetrics",
"test": "Run unit tests"
}
}

7
phpmetrics.json Normal file
View File

@ -0,0 +1,7 @@
{
"includes": ["system"],
"excludes": ["ThirdParty"],
"report": {
"html": "build/phpmetrics/"
}
}

View File

@ -0,0 +1,5 @@
{
"require-dev": {
"phpmetrics/phpmetrics": "^3.0rc6"
}
}