From 3e25f245f95bdaeb9db2e6e0540189d5378ad05d Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Sun, 12 Jul 2015 23:04:43 +0200 Subject: 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_ Examples $ make PHPCS_PSR1 $ make PHPCS_Zend Signed-off-by: VirtualTam --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 80efcfaa..5104e302 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,10 @@ static_analysis_summary: code_sniffer_source copy_paste mess_detector_summary code_sniffer: code_sniffer_full +### - errors filtered by coding standard: PEAR, PSR1, PSR2, Zend... +PHPCS_%: + @$(BIN)/phpcs $(PHP_SOURCE) --report-full --report-width=200 --standard=$* + ### - errors by Git author code_sniffer_blame: @$(BIN)/phpcs $(PHP_SOURCE) --report-gitblame -- cgit v1.2.3