]> git.openstreetmap.org Git - nominatim.git/commitdiff
phpcs instructions only searched one level deep
authorMarc Tobias Metten <mtmail@gmx.net>
Fri, 23 Feb 2018 00:15:36 +0000 (01:15 +0100)
committerMarc Tobias Metten <mtmail@gmx.net>
Fri, 23 Feb 2018 00:15:36 +0000 (01:15 +0100)
.travis.yml
CONTRIBUTING.md
phpcs.xml

index 5efc9f083171489a6d391896047c52afb322cdda..c67f155e4240a1b5e2a0e0e08d0b1937143f36c7 100644 (file)
@@ -22,7 +22,7 @@ script:
   - if [[ $TEST_SUITE == "monaco" ]]; then ./utils/specialphrases.php --wiki-import | psql -d test_api_nominatim >/dev/null; fi
   - cd $TRAVIS_BUILD_DIR/test/php
   - if [[ $TEST_SUITE == "tests" ]]; then phpunit ./ ; fi
-  - if [[ $TEST_SUITE == "tests" ]]; then phpcs --report-width=120 */**.php ; fi
+  - if [[ $TEST_SUITE == "tests" ]]; then phpcs --report-width=120 . ; fi
   - cd $TRAVIS_BUILD_DIR/test/bdd
   - # behave --format=progress3 api
   - if [[ $TEST_SUITE == "tests" ]]; then behave --format=progress3 db ; fi
index a00d0ed354aa68ac5ffe4a00d107253f4c62874d..dc5be190ad7633ec325241f48fd977b65f786f75 100644 (file)
@@ -82,7 +82,7 @@ are in process of consolodating the style. The following rules apply:
 The coding style is enforced with PHPCS and can be tested with:
 
 ```
-  phpcs --report-width=120 --colors */**.php
+  phpcs --report-width=120 --colors .
 ```
 
 ## Testing
index 8f92f7c99078b87ca7f0bfd213fe93bfe5c44315..dd71c5b8cbcfdff2471f675a886b264cebcbc098 100644 (file)
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -8,6 +8,12 @@
   <!-- https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PSR2/ruleset.xml -->
   <rule ref="PSR2"/>
 
+  <exclude-pattern>./lib/template/*html*</exclude-pattern>
+  <exclude-pattern>./lib/template/includes/</exclude-pattern>
+  <exclude-pattern>./module/</exclude-pattern>
+  <exclude-pattern>./website/css</exclude-pattern>
+  <exclude-pattern>./website/js</exclude-pattern>
+
   <rule ref="Generic.Files.LineLength">
     <properties>
      <property name="lineLimit" value="194"/>