]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Coding style: switch PHPCS to PSR12
authorArthurHoaro <arthur@hoa.ro>
Tue, 22 Sep 2020 18:16:23 +0000 (20:16 +0200)
committerArthurHoaro <arthur@hoa.ro>
Sun, 8 Nov 2020 13:09:15 +0000 (14:09 +0100)
Also temporarily ignore test code (one step at a time).

Reference: https://www.php-fig.org/psr/psr-12/

Related to #95

Makefile
phpcs.xml

index 7415887a42cb572a7f632374193e91d87e8895f9..181b61c4c476c1f3f16b5bfeb39789b9ea090bcd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,10 +27,6 @@ PHPCS := $(BIN)/phpcs
 code_sniffer:
        @$(PHPCS)
 
-### - errors filtered by coding standard: PEAR, PSR1, PSR2, Zend...
-PHPCS_%:
-       @$(PHPCS) --report-full --report-width=200 --standard=$*
-
 ### - errors by Git author
 code_sniffer_blame:
        @$(PHPCS) --report-gitblame
index 29b95d56dacffcff94e3a92cd6137289750e6686..349dc5664f6ac626c6f982edc51f9375074508b6 100644 (file)
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -5,13 +5,13 @@
   <file>index.php</file>
   <file>application</file>
   <file>plugins</file>
-  <file>tests</file>
+<!--  <file>tests</file>-->
 
   <exclude-pattern>*/*.css</exclude-pattern>
   <exclude-pattern>*/*.js</exclude-pattern>
 
   <arg name="colors"/>
 
-  <rule ref="PSR1"/>
-  <rule ref="PSR2"/>
+  <rule ref="PSR12"/>
+  <rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
 </ruleset>