mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-31 04:34:27 +00:00
Display summary of warnings (#932)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
warning_count="${#warnings[@]}"
|
||||
if [[ "${warning_count}" -ge 1 ]]; then
|
||||
echo -e "\nWarnings found: ${warning_count}"
|
||||
|
||||
iter=0
|
||||
for value in "${warnings[@]}"; do
|
||||
((iter++))
|
||||
echo -e "\nWarning ${iter} of ${warning_count}:"
|
||||
echo "⚠️ ${value}" | perl -pe 's/^(.*)$/\t\1/'
|
||||
done
|
||||
fi
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
set -x
|
||||
|
||||
warnings=()
|
||||
errors=()
|
||||
|
||||
if [[ "${CI}" == "true" ]]; then
|
||||
@@ -55,6 +56,7 @@ source "run_static_analysis_check_psalm.sh"
|
||||
|
||||
set +x
|
||||
|
||||
source "display_warnings.inc.sh"
|
||||
source "display_errors.inc.sh"
|
||||
|
||||
if [[ "${CI_PHP_FUTURE_RELEASE}" != "true" ]]; then
|
||||
|
||||
@@ -132,6 +132,7 @@ if [[ $(echo "${CI_PHP_VERSION} < 8.4" | bc -l) -eq 1 ]]; then
|
||||
fi
|
||||
else
|
||||
echo "⚠️ Skipped running PHP-CS-Fixer coding standards check"
|
||||
warnings+=("Skipped running PHP-CS-Fixer coding standards check")
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
@@ -27,6 +27,7 @@ if [[ $(echo "${CI_PHP_VERSION} >= 7.4" | bc -l) -eq 1 ]]; then
|
||||
fi
|
||||
else
|
||||
echo "⚠️ Skipped running phpstan check"
|
||||
warnings+=("Skipped running phpstan check")
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
@@ -12,6 +12,7 @@ set -x
|
||||
|
||||
if [[ ! -f "vendor/bin/psalm" ]]; then
|
||||
echo "⚠️ Skipped running psalm static analysis check"
|
||||
warnings+=("Skipped running psalm static analysis check")
|
||||
else
|
||||
vendor/bin/psalm --version
|
||||
|
||||
|
||||
Reference in New Issue
Block a user