feat: mise à jour task phpstan avec baseline #1

Open
vcarroy wants to merge 2 commits from phpstan_baseline into develop
Showing only changes of commit 08684ef636 - Show all commits

View File

@ -3,41 +3,18 @@ kind: Task
metadata:
name: phpstan
spec:
description: PHP-CS-Fixer on modified code
description: Phpstan on modified code
workspaces:
- name: source
params:
- name: apiurl
- name: requestid
steps:
- name: exec
image: ghcr.io/phpstan/phpstan:1
command:
- /bin/sh
args:
- '-c'
- |
#set -e
echo ""
echo "== INSTALL PHPSTAN ======================================="
composer require phpstan/phpstan-symfony
composer require phpstan/phpstan-doctrine
cat << EOF > /app/phpstan.neon
includes:
- /app/vendor/phpstan/phpstan-symfony/extension.neon
- /app/vendor/phpstan/phpstan-doctrine/extension.neon
- /app/vendor/phpstan/phpstan-doctrine/rules.neon
EOF
echo ""
echo "== RUN PHPSTAN ==========================================="
cd $(workspaces.source.path)
php $(which phpstan) analyse -l 1 --error-format=table src/ > temp_phpstan.txt
RESULT=$(cat temp_phpstan.txt)
echo "${RESULT}"
echo ""
echo ""
- name: analyse
image: reg.cadoles.com/cnous-mse/phpstan
script: |
#!/bin/sh
echo "== RUN PHPSTAN ==========================================="
cd $(workspaces.source.path)
phpstan analyse -l 5 --configuration phpstan-pipeline.neon --error-format table --no-progress > temp_phpstan.txt 2>&1
cat temp_phpstan.txt
Review

Je ne vois pas la pertinence d'utiliser une autre image, qui de plus est, fait la même chose que le script précédent.

Je ne vois pas la pertinence d'utiliser une autre image, qui de plus est, fait la même chose que le script précédent.