diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -2,7 +2,6 @@ | |||
2 | # Makefile for PHP code analysis & testing, documentation and release generation | 2 | # Makefile for PHP code analysis & testing, documentation and release generation |
3 | 3 | ||
4 | BIN = vendor/bin | 4 | BIN = vendor/bin |
5 | PHP_SOURCE = index.php application tests plugins | ||
6 | 5 | ||
7 | all: static_analysis_summary check_permissions test | 6 | all: static_analysis_summary check_permissions test |
8 | 7 | ||
@@ -23,23 +22,26 @@ docker_%: | |||
23 | # - http://pear.php.net/manual/en/package.php.php-codesniffer.usage.php | 22 | # - http://pear.php.net/manual/en/package.php.php-codesniffer.usage.php |
24 | # - http://pear.php.net/manual/en/package.php.php-codesniffer.reporting.php | 23 | # - http://pear.php.net/manual/en/package.php.php-codesniffer.reporting.php |
25 | ## | 24 | ## |
26 | code_sniffer: code_sniffer_full | 25 | PHPCS := $(BIN)/phpcs |
26 | |||
27 | code_sniffer: | ||
28 | @$(PHPCS) | ||
27 | 29 | ||
28 | ### - errors filtered by coding standard: PEAR, PSR1, PSR2, Zend... | 30 | ### - errors filtered by coding standard: PEAR, PSR1, PSR2, Zend... |
29 | PHPCS_%: | 31 | PHPCS_%: |
30 | @$(BIN)/phpcs $(PHP_SOURCE) --report-full --report-width=200 --standard=$* | 32 | @$(PHPCS) --report-full --report-width=200 --standard=$* |
31 | 33 | ||
32 | ### - errors by Git author | 34 | ### - errors by Git author |
33 | code_sniffer_blame: | 35 | code_sniffer_blame: |
34 | @$(BIN)/phpcs $(PHP_SOURCE) --report-gitblame | 36 | @$(PHPCS) --report-gitblame |
35 | 37 | ||
36 | ### - all errors/warnings | 38 | ### - all errors/warnings |
37 | code_sniffer_full: | 39 | code_sniffer_full: |
38 | @$(BIN)/phpcs $(PHP_SOURCE) --report-full --report-width=200 | 40 | @$(PHPCS) --report-full --report-width=200 |
39 | 41 | ||
40 | ### - errors grouped by kind | 42 | ### - errors grouped by kind |
41 | code_sniffer_source: | 43 | code_sniffer_source: |
42 | @$(BIN)/phpcs $(PHP_SOURCE) --report-source || exit 0 | 44 | @$(PHPCS) --report-source || exit 0 |
43 | 45 | ||
44 | ## | 46 | ## |
45 | # Checks source file & script permissions | 47 | # Checks source file & script permissions |