2020-07-31 10:24:18 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-01-29 11:50:35 -06:00
|
|
|
#
|
|
|
|
# phpstan.sh
|
|
|
|
# Copyright (c) 2021 james@firefly-iii.org
|
|
|
|
#
|
|
|
|
# This file is part of Firefly III (https://github.com/firefly-iii).
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Affero General Public License as
|
|
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
|
|
# License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Affero General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
|
2020-07-31 12:10:02 -05:00
|
|
|
# Install composer packages
|
2021-04-06 10:00:00 -05:00
|
|
|
#composer install --no-scripts --no-ansi
|
2020-07-31 12:28:08 -05:00
|
|
|
|
2022-10-30 06:21:41 -05:00
|
|
|
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
|
|
|
2020-07-31 22:49:45 -05:00
|
|
|
# enable test .env file.
|
2022-10-30 06:02:56 -05:00
|
|
|
# cp .ci/.env.ci .env
|
2020-07-31 10:24:18 -05:00
|
|
|
|
2020-07-31 12:10:02 -05:00
|
|
|
# Do static code analysis.
|
2021-04-06 10:00:00 -05:00
|
|
|
# ./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress
|
2022-12-11 03:43:52 -06:00
|
|
|
./vendor/bin/phpstan analyse -c .ci/phpstan.neon --xdebug --error-format=table > phpstan-report.txt
|
2023-02-12 03:10:00 -06:00
|
|
|
|
|
|
|
echo 'The PHPstan report can be found in phpstan-report.txt'
|