diff --git a/.travis.yml b/.travis.yml index 5e3f1511266..d7d11a8d405 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ # from Dolibarr GitHub repository. # For syntax, see http://about.travis-ci.org/docs/user/languages/php/ -# We use dist: precise to have php 5.3 available +# We use dist: precise to have php 5.3 available dist: trusty sudo: required @@ -20,7 +20,7 @@ addons: # To use the last version of pgloader, we add repo of postgresql - postgresql - sourceline: 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main' - - key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' + - key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' packages: # We need a webserver to test the webservices # Let's install Apache with. @@ -101,7 +101,7 @@ before_install: pgloader --version echo fi - + install: - | echo "Updating Composer" @@ -133,7 +133,7 @@ install: - | echo "Installing PHP CodeSniffer" - composer -n require squizlabs/php_codesniffer ^2 + composer -n require squizlabs/php_codesniffer ^3 echo - | @@ -195,7 +195,7 @@ before_script: mysql --version | head - mysql -e "SELECT VERSION();" | head - echo - + - | echo "Setting up database" if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then @@ -203,7 +203,7 @@ before_script: mysql -e 'DROP DATABASE IF EXISTS travis;' mysql -e 'CREATE DATABASE IF NOT EXISTS travis;' mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;' - mysql -e 'FLUSH PRIVILEGES;' + mysql -e 'FLUSH PRIVILEGES;' mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql fi if [ "$DB" = 'postgresql' ]; then @@ -293,6 +293,7 @@ script: # Ensure we catch errors set -e # Exclusions are defined in the ruleset.xml file + phpcs --version #phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 . phpcs -s -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true . set +e @@ -384,4 +385,3 @@ after_failure: # TODO: PostgreSQL log file echo fi - diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 6619cf83754..c1136b668c5 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -4,6 +4,7 @@ Dolibarr coding standard. build/html + build/aps documents htdocs/custom htdocs/includes @@ -14,40 +15,25 @@ - + - + 0 - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - 0 - - - 0 - + + + + + + + + + + + @@ -147,7 +133,7 @@ 0 - + @@ -163,7 +149,7 @@ 0 - + @@ -186,7 +172,7 @@ 0 - + 0 @@ -206,14 +192,14 @@ 0 - + 0 - - - - + 5 - + 0 0 - + @@ -254,11 +240,11 @@ 0 - + 0 - + 0 @@ -328,14 +314,14 @@ 0 - + 0 - + 0 @@ -343,7 +329,7 @@ 0 - + @@ -363,6 +349,9 @@ 0 + + 0 + 0 @@ -372,19 +361,19 @@ 0 - + - +