Skip to content

Commit

Permalink
Merge pull request codeigniter4#8547 from kenjis/add-phpmetrics
Browse files Browse the repository at this point in the history
chore: add PhpMetrics
  • Loading branch information
kenjis authored Feb 21, 2024
2 parents 4336f21 + 16cbc68 commit 4ef8619
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@
},
"scripts": {
"post-update-cmd": [
"CodeIgniter\\ComposerScripts::postUpdate"
"CodeIgniter\\ComposerScripts::postUpdate",
"composer update --working-dir=tools/phpmetrics"
],
"analyze": [
"Composer\\Config::disableProcessTimeout",
Expand All @@ -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"
Expand All @@ -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 changes: 7 additions & 0 deletions phpmetrics.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"includes": ["system"],
"excludes": ["ThirdParty"],
"report": {
"html": "build/phpmetrics/"
}
}
5 changes: 5 additions & 0 deletions tools/phpmetrics/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require-dev": {
"phpmetrics/phpmetrics": "^3.0rc6"
}
}

0 comments on commit 4ef8619

Please sign in to comment.