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-cpd commit hook #10

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

Add new php-cpd commit hook #10

wants to merge 3 commits into from

Conversation

craig-davis
Copy link
Contributor

Feature

PHP Copy Paste Detector is a QA tool that can be used to find duplicate code. This adds a new pre-commit-php hook for calling phpcpd.

Implementation

This is fairly straightforward and also follows the general pattern of php-cs-fixer. This will ONLY analyze the files that are staged for duplicate code, and not the entire project. A feature to scan the entire project could perhaps be added.

Sample Output

Sample Output

Review

This was a little rushed, and the commit to both the README and hooks files have the entries from php-md in it. This should sort itself out in the merge, but if you'd like a tidier PR, please let me know.

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