diff --git a/.travis.yml b/.travis.yml index e4ee4e19..2cce9b1f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,3 +56,8 @@ script: echo "Running the unit tests"; vendor/bin/phpunit core/tests/; vendor/bin/phpunit Tests/Unit/; + + - > + echo; + echo "Running PHPMD"; + vendor/bin/phpmd Classes/ text Configuration/PHPMD/rules.xml; diff --git a/Configuration/PHPMD/rules.xml b/Configuration/PHPMD/rules.xml new file mode 100644 index 00000000..1e298035 --- /dev/null +++ b/Configuration/PHPMD/rules.xml @@ -0,0 +1,39 @@ + + + + PHPMD rules for phpList + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/composer.json b/composer.json index 8145f07a..3594ddd0 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,8 @@ }, "require-dev": { "phpunit/phpunit": "^6.2.2", - "squizlabs/php_codesniffer": "^3.0.1" + "squizlabs/php_codesniffer": "^3.0.1", + "phpmd/phpmd": "^2.6.0" }, "suggest": { "phplist/web-frontend": "^4.0.0-dev",