From 749236bc8dd166e7965d1923981fbe4757f1ef7b Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 31 Jul 2020 19:10:02 +0200 Subject: [PATCH] Push better PHPStan config. --- .ci/phpstan.neon | 1 - .ci/phpstan.sh | 15 ++++----------- .travis.yml | 15 ++++++++------- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/.ci/phpstan.neon b/.ci/phpstan.neon index 2aeb078212..ccbfbd9b6d 100644 --- a/.ci/phpstan.neon +++ b/.ci/phpstan.neon @@ -14,7 +14,6 @@ parameters: - ../database - ../resources - ../routes - - ../tests - ../bootstrap/app.php diff --git a/.ci/phpstan.sh b/.ci/phpstan.sh index d1328381ca..35f44a111c 100755 --- a/.ci/phpstan.sh +++ b/.ci/phpstan.sh @@ -1,14 +1,7 @@ #!/usr/bin/env bash -FF_DIR=$PWD +# Install composer packages +composer install --no-suggest --no-scripts --no-ansi -# single line install command -composer global require hirak/prestissimo \ - --no-plugins --no-scripts - -cd $FF_DIR - -echo "Changed back to '$FF_DIR'" - -composer install -./vendor/bin/phpstan analyse -c .ci/phpstan.neon +# Do static code analysis. +./vendor/bin/phpstan analyse -c .ci/phpstan.neon > phpstan.txt diff --git a/.travis.yml b/.travis.yml index d5fa863c09..4979f77a1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,21 @@ language: php php: - - '7.4' +- '7.4' dist: xenial os: linux - cache: directories: - - /home/travis/.config - - /home/travis/build/firefly-iii/firefly-iii/vendor + - "/home/travis/.config" + - "/home/travis/build/firefly-iii/firefly-iii/vendor" branches: only: - - develop + - develop before_script: - - phpenv config-rm xdebug.ini || return 0 +- phpenv config-rm xdebug.ini || return 0 +- composer global require hirak/prestissimo --no-plugins --no-scripts + script: - - ./.ci/phpstan.sh \ No newline at end of file +- "./.ci/phpstan.sh"