]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #276 from virtualtam/tools/phpcs
authorVirtualTam <tamisier.aurelien@gmail.com>
Fri, 31 Jul 2015 14:08:32 +0000 (16:08 +0200)
committerVirtualTam <tamisier.aurelien@gmail.com>
Fri, 31 Jul 2015 14:08:32 +0000 (16:08 +0200)
Add a generic rule to run PHPCS against different coding standards

1  2 
Makefile

diff --combined Makefile
index 28353587c238dfdd91809d00d7debc751c2178e7,5104e302c19e0cec0eeebf2b9b145d6b850ccc65..d69fac46b2a6fccd1a85c3b4d55e1f45c9ff88a6
+++ b/Makefile
@@@ -36,6 -36,10 +36,10 @@@ static_analysis_summary: code_sniffer_s
  
  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
@@@ -102,7 -106,7 +106,7 @@@ mess_detector_summary: mess_titl
  # See phpunit.xml for configuration
  # https://phpunit.de/manual/current/en/appendixes.configuration.html
  ##
 -test: clean
 +test:
        @echo "-------"
        @echo "PHPUNIT"
        @echo "-------"
  
  ### remove all unversioned files
  clean:
 -              @git clean -df
 +      @git clean -df
  
  ### update the local copy of the documentation
  doc: clean
 -              @rm -rf doc
 -              @git clone https://github.com/shaarli/Shaarli.wiki.git doc
 -              @rm -rf doc/.git
 +      @rm -rf doc
 +      @git clone https://github.com/shaarli/Shaarli.wiki.git doc
 +      @rm -rf doc/.git
  
  ### Convert local markdown documentation to HTML
  htmldoc: