diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67bc411..9441451 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,7 @@ jobs: - "composer:unused" - "json:lint" - "php:cs-fixer" + - "php:mess" - "php:sniff" - "php:stan" - "typoscript:lint" diff --git a/Build/phpmd/phpmd.xml b/Build/phpmd/phpmd.xml new file mode 100644 index 0000000..7f5b84e --- /dev/null +++ b/Build/phpmd/phpmd.xml @@ -0,0 +1,33 @@ + + + + PHPMD rules for Tea + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/composer.json b/composer.json index d28cc2b..830b23d 100644 --- a/composer.json +++ b/composer.json @@ -53,6 +53,7 @@ "icanhazstring/composer-unused": "^0.8.11", "php-coveralls/php-coveralls": "^2.7.0", "php-parallel-lint/php-parallel-lint": "^1.4", + "phpmd/phpmd": "^2.15.0", "phpstan/extension-installer": "^1.4.1", "phpstan/phpstan": "^1.11.8", "phpstan/phpstan-phpunit": "^1.4.0", @@ -146,6 +147,7 @@ ], "ci:php:cs-fixer": "php-cs-fixer fix --config .php-cs-fixer.php -v --dry-run --diff", "ci:php:lint": "parallel-lint .*.php *.php Classes Configuration Tests", + "ci:php:mess": "phpmd Classes text Build/phpmd/phpmd.xml", "ci:php:sniff": "phpcs Classes Configuration Tests", "ci:php:stan": "phpstan --no-progress", "ci:static": [ @@ -218,6 +220,7 @@ "ci:php": "Runs all static checks for the PHP files.", "ci:php:cs-fixer": "Checks the code style with the PHP Coding Standards Fixer (PHP-CS-Fixer).", "ci:php:lint": "Lints the PHP files for syntax errors.", + "ci:php:mess": "Runs PHP mess detection.", "ci:php:sniff": "Checks the code style with PHP_CodeSniffer (PHPCS).", "ci:php:stan": "Checks the PHP types using PHPStan.", "ci:static": "Runs all static code checks (syntax, style, types).",