Skip to content

Conversation

craig-davis
Copy link
Contributor

Feature

PHP Mess Detector is a QA tool that can be used to test for cyclomatic and NPath complexity, naming conventions, and a collection of potential bugs. This adds a new pre-commit-php hook for calling phpmd.

Implementation

This is fairly straightforward and follows the general pattern of php-cs-fixer. There is one extra bit of code in the php-md.sh on line 63 to clean up the output of phpmd. By default, it includes the full path to the file in each error line. I've trimmed that out and instead we're showing the relative path as a file grouping.

Sample Output

Sample Output

@craig-davis
Copy link
Contributor Author

Here's the next one on my checklist. I've just got phpcpd on my todo list, and then I think we'll have the whole collection.

Thanks again for all your work in maintaining this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant