Skip to content
Snippets Groups Projects
Commit da94cea2 authored by Daniel Hürtgen's avatar Daniel Hürtgen
Browse files

TASK: Implement php mess detector

parent dafe0b42
No related merge requests found
......@@ -9,7 +9,7 @@ before_script:
- apt-get update; apt-get install -y unzip
- composer install --optimize-autoloader --no-interaction --no-ansi --prefer-dist
lint:coding-guideline:
lint:coding-guideline: &PHP-LINTING
image: tetraweb/php:7.0
stage: test
script:
......@@ -19,6 +19,11 @@ lint:coding-guideline:
when: on_failure
paths:
- result
lint:php-mass-detection:
<<: *PHP-LINTING
script:
- ./vendor/bin/phpmd src text phpmd.xml > result/phpmd.txt
test:5.3: &PHP-UNITTESTING
image: tetraweb/php:5.3
stage: test
......
......@@ -35,7 +35,8 @@
},
"require-dev": {
"composer/composer": "^1.4",
"phpunit/phpunit": "^4.5 || ^5.0.5"
"phpunit/phpunit": "^4.5 || ^5.0.5",
"phpmd/phpmd": "^2.6"
},
"extra": {
"class": "Higidi\\ComposerPhpCSStandardsPlugin\\Plugin",
......
<?xml version="1.0"?>
<ruleset name="My first PHPMD rule set"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="
http://pmd.sf.net/ruleset_xml_schema.xsd">
<rule ref="rulesets/cleancode.xml" />
<rule ref="rulesets/codesize.xml" />
<rule ref="rulesets/controversial.xml" />
<rule ref="rulesets/design.xml" />
<rule ref="rulesets/naming.xml" />
<rule ref="rulesets/unusedcode.xml" />
</ruleset>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment