Skip to content

Commit

Permalink
add QA tool: phpcpd
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <[email protected]>
  • Loading branch information
jkowalleck committed Oct 10, 2022
1 parent 22491b8 commit 9421894
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"@composer -dtools/composer-require-checker update",
"@composer -dtools/composer-unused update",
"@composer -dtools/php-cs-fixer update",
"@composer -dtools/phpcpd update",
"@composer -dtools/phpmd update",
"@composer -dtools/psalm update",
"@composer -dtools/infection update",
Expand All @@ -100,7 +101,8 @@
"test:infection": "@php -d zend.assertions=1 -d assert.exception=1 -d display_errors=On -d error_reporting=-1 -d log_errors_max_len=0 -d memory_limit=-1 -d xdebug.mode=coverage -d pcov.enabled=1 -d pcov.directory=src tools/infection/vendor/infection/infection/bin/infection ",
"test:phpmd": "@php tools/phpmd/vendor/phpmd/phpmd/src/bin/phpmd src ansi .phpmd.rules.dist.xml",
"test:phpunit": "@php -d zend.assertions=1 -d assert.exception=1 -d display_errors=On -d error_reporting=-1 -d log_errors_max_len=0 -d memory_limit=-1 -d xdebug.mode=coverage -d pcov.enabled=1 -d pcov.directory=src vendor/phpunit/phpunit/phpunit",
"test:psalm": "@php tools/psalm/vendor/vimeo/psalm/psalm"
"test:psalm": "@php tools/psalm/vendor/vimeo/psalm/psalm",
"test:phpcpd": "@php tools/phpcpd/vendor/sebastian/phpcpd/phpcpd --exclude src/Core/Spec/SpecFactory.php --exclude src/Core/Serialization/DOM/NormalizerFactory.php --exclude src/Core/Serialization/JSON/NormalizerFactory.php --fuzzy src"
},
"scripts-descriptions": {
"cs-fix": "Fix files according to coding standards.",
Expand Down
3 changes: 3 additions & 0 deletions tools/phpcpd/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!/.gitignore
!/composer.json
17 changes: 17 additions & 0 deletions tools/phpcpd/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "tools/phpcpd",
"description": "PHP Copy/Paste Detector",
"type": "metapackage",
"require-dev": {
"roave/security-advisories": "dev-latest",
"sebastian/phpcpd": "^6.0"
},
"prefer-stable": true,
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": false
},
"preferred-install": "dist",
"sort-packages": true
}
}

0 comments on commit 9421894

Please sign in to comment.