Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new php-md commit hook #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add new php-md commit hook #9

wants to merge 3 commits into from

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