|
1 |
| -#!/usr/bin/env sh |
| 1 | +#!/usr/bin/env bash |
| 2 | + |
| 3 | +# Go to the root dir first, so configs and vendor dir is found |
| 4 | +cd $(git rev-parse --show-toplevel) |
2 | 5 |
|
3 | 6 | echo -e "\nPHPLINT src/:"
|
4 | 7 | find src/ -iname "*.php" -print0 | xargs -0 -n1 php -l 1>/dev/null || exit $?
|
5 | 8 | echo -e "\nPHPLINT tests/:"
|
6 | 9 | find tests/ -iname "*.php" -print0 | xargs -0 -n1 php -l 1>/dev/null || exit $?
|
7 | 10 | echo -e "\nPHPUNIT:"
|
8 |
| -composer exec -- phpunit --stop-on-error --stop-on-failure --report-useless-tests --colors=auto || exit $? |
| 11 | +./vendor/bin/phpunit --stop-on-error --stop-on-failure --colors=auto || exit $? |
9 | 12 | echo -e "\nPHPCS src/:"
|
10 |
| -phpcs --warning-severity=0 --standard=PSR2 src/ || exit $? |
| 13 | +./vendor/bin/phpcs --warning-severity=0 --standard=PSR2 src/ || exit $? |
11 | 14 | echo -e "\nPHPCS tests/:"
|
12 |
| -phpcs --warning-severity=0 --standard=PSR2 tests/ || exit $? |
| 15 | +./vendor/bin/phpcs --warning-severity=0 --standard=PSR2 tests/ || exit $? |
13 | 16 | echo -e "\nPHPMD src/:"
|
14 |
| -phpmd src/ text phpmd.xml || exit $? |
| 17 | +./vendor/bin/phpmd src/ text phpmd.xml || exit $? |
15 | 18 | echo -e "\nPHPMD tests/:"
|
16 |
| -phpmd tests/ text phpmd-tests.xml || exit $? |
| 19 | +./vendor/bin/phpmd tests/ text phpmd-tests.xml || exit $? |
17 | 20 | echo -e "\nPHPCPD src/:"
|
18 |
| -phpcpd --min-lines=7 --min-tokens=30 --fuzzy -v src/ || exit $? |
| 21 | +./vendor/bin/phpcpd --min-lines=7 --min-tokens=30 --fuzzy -v src/ || exit $? |
19 | 22 | echo -e "\nPHPCPD tests/:"
|
20 |
| -phpcpd --min-lines=7 --min-tokens=30 --fuzzy tests/ #|| exit $? |
| 23 | +./vendor/bin/phpcpd --min-lines=7 --min-tokens=30 --fuzzy tests/ || exit $? |
| 24 | + |
21 | 25 |
|
22 |
| -echo "\n\n All Done, no failures.\n" |
| 26 | +echo -e "\n\n All Done, no failures.\n" |
0 commit comments