mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Merge pull request #8547 from kenjis/add-phpmetrics
chore: add PhpMetrics
This commit is contained in:
commit
4ef8619fef
@ -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
7
phpmetrics.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"includes": ["system"],
|
||||
"excludes": ["ThirdParty"],
|
||||
"report": {
|
||||
"html": "build/phpmetrics/"
|
||||
}
|
||||
}
|
5
tools/phpmetrics/composer.json
Normal file
5
tools/phpmetrics/composer.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"require-dev": {
|
||||
"phpmetrics/phpmetrics": "^3.0rc6"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user