diff options
author | VirtualTam <virtualtam@flibidi.net> | 2015-07-12 23:04:43 +0200 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2015-07-12 23:04:43 +0200 |
commit | 3e25f245f95bdaeb9db2e6e0540189d5378ad05d (patch) | |
tree | 5d7c4c2e267b81b47a0a45f9b1fd22a02dc44d80 | |
parent | 5b0ebbc5de06b8a0e9679b78b45d0dc755db7986 (diff) | |
download | Shaarli-3e25f245f95bdaeb9db2e6e0540189d5378ad05d.tar.gz Shaarli-3e25f245f95bdaeb9db2e6e0540189d5378ad05d.tar.zst Shaarli-3e25f245f95bdaeb9db2e6e0540189d5378ad05d.zip |
Makefile: add a generic rule to run PHPCS against different coding standards
Relates to #95
Usage
- list available standards
$ ./vendor/bin/phpcs -i
- run PHPCS against a given standard
$ make PHPCS_<standard>
Examples
$ make PHPCS_PSR1
$ make PHPCS_Zend
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -36,6 +36,10 @@ static_analysis_summary: code_sniffer_source copy_paste mess_detector_summary | |||
36 | 36 | ||
37 | code_sniffer: code_sniffer_full | 37 | code_sniffer: code_sniffer_full |
38 | 38 | ||
39 | ### - errors filtered by coding standard: PEAR, PSR1, PSR2, Zend... | ||
40 | PHPCS_%: | ||
41 | @$(BIN)/phpcs $(PHP_SOURCE) --report-full --report-width=200 --standard=$* | ||
42 | |||
39 | ### - errors by Git author | 43 | ### - errors by Git author |
40 | code_sniffer_blame: | 44 | code_sniffer_blame: |
41 | @$(BIN)/phpcs $(PHP_SOURCE) --report-gitblame | 45 | @$(BIN)/phpcs $(PHP_SOURCE) --report-gitblame |