From 39d691fd7fe7ffb75c0834b7cd3679db829c827d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sun, 5 Jul 2020 21:38:41 +0200 Subject: [PATCH] MAPG-199 add static code analysis step to pipeline --- bitbucket-pipelines.yml | 9 +++++++++ phpstan.neon | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 phpstan.neon diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 2049a3d..ee372df 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -13,3 +13,12 @@ pipelines: - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - composer install - vendor/bin/phpunit --log-junit unit_test_results.xml --testdox tests + - step: + name: Static Code Analysis + caches: + - composer + script: + - apt-get update && apt-get install -y unzip + - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + - composer install + - vendor/bin/phpstan analyse -c phpstan.neon diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..131cec1 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,9 @@ +parameters: + level: 5 + checkMissingIterableValueType: false + paths: + - main.php + - mapg + - web.php + - src + - tests