Skip to content

Commit

Permalink
Add PHP mess detector but silence for now
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Aug 20, 2019
1 parent 3ce4205 commit deb781e
Show file tree
Hide file tree
Showing 5 changed files with 243 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ install:
script:
- npm run lint
- npm run test
- npm run mess -- --ignore-violations-on-exit

after_script:
- npm run coverage
Expand Down
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"mockery/mockery": "^0.9",
"php-coveralls/php-coveralls": "^2.1.0",
"phpcompatibility/php-compatibility": "^9.2",
"phpmd/phpmd": "^2.7",
"phpunit/phpunit": "^5",
"wp-coding-standards/wpcs": "^2.1",
"wpsh/local": "^0.2.3"
Expand All @@ -46,6 +47,9 @@
"composer validate --no-check-publish --strict",
"phpcs ."
],
"mess": [
"phpmd ./src text phpmd.xml --suffixes php"
],
"test": [
"phpunit"
],
Expand Down
230 changes: 229 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"lint": "composer lint",
"precommit": "composer lint && composer test",
"coverage": "composer coverage",
"mess": "composer mess",
"postinstall": "composer install"
},
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions phpmd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<ruleset name="WordPress Theme PHPMD rule set">
<rule ref="rulesets/cleancode.xml" />
<rule ref="rulesets/codesize.xml" />
<rule ref="rulesets/design.xml" />
<rule ref="rulesets/naming.xml" />
<rule ref="rulesets/unusedcode.xml" />
</ruleset>

0 comments on commit deb781e

Please sign in to comment.