Skip to content

Commit

Permalink
Config variables for PHPMD
Browse files Browse the repository at this point in the history
  • Loading branch information
devdrops committed Apr 11, 2016
1 parent 24038a1 commit bfbdc56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions config.dist
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ PHPCS_IGNORE_WARNINGS=1

# encoding
PHPCS_ENCODING=utf-8

# PHP Mess Detector output mode
PHPMD_OUTPUT_MODE=text

# PHP Mess Detector patterns
PHPMD_PATTERNS=cleancode,codesize,controversial,design,naming,unusedcode
4 changes: 3 additions & 1 deletion pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
PHPCS_BIN=/usr/bin/phpcs
PHPMD_BIN=/usr/bin/phpmd
PHPCS_CODING_STANDARD=PEAR
PHPMD_OUTPUT_MODE=text
PHPMD_PATTERNS=cleancode,codesize,controversial,design,naming,unusedcode
PHPCS_IGNORE=
TMP_STAGING=".tmp_staging"

Expand Down Expand Up @@ -130,7 +132,7 @@ fi
echo ""
echo " :: PHP Mess Detector inspection :: "
echo ""
PHPMD_OUTPUT=$($PHPMD_BIN $STAGED_FILES text cleancode,codesize,controversial,design,naming,unusedcode)
PHPMD_OUTPUT=$($PHPMD_BIN $STAGED_FILES $PHPMD_OUTPUT_MODE $PHPMD_PATTERNS)
PHPMD_RETVAL=$?

if [ $PHPMD_RETVAL -ne 0 ]; then
Expand Down

0 comments on commit bfbdc56

Please sign in to comment.