From 663f7d15426452f6d7d0156e18be4f511458a094 Mon Sep 17 00:00:00 2001 From: Navarr Date: Thu, 16 Feb 2023 11:53:31 -0500 Subject: [PATCH] Add ability to trigger the Show Info flag --- action.yml | 10 +++++++--- entrypoint.sh | 7 ++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 32e5a2f..dbd9ca4 100644 --- a/action.yml +++ b/action.yml @@ -14,19 +14,23 @@ name: 'Psalm – Static Analysis for PHP' inputs: security_analysis: required: false - default: false + default: 'false' description: 'Whether or not to use Psalm’s security analysis' + show_info: + required: false + default: 'false' + description: 'Whether or not to show non-exception parser findings' report_file: required: false default: '' description: 'File for Psalm’s output' composer_require_dev: required: false - default: false + default: 'false' description: 'Whether or not Composer installs dev packages' composer_ignore_platform_reqs: required: false - default: false + default: 'false' description: 'Whether or not the --ignore-platform-reqs flag is passed to Composer' ssh_key: description: The private key contents to use for private repositories diff --git a/entrypoint.sh b/entrypoint.sh index a160d66..7d19527 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,6 +11,11 @@ if [ ! -z "$INPUT_REPORT_FILE" ]; then REPORT="--report=$INPUT_REPORT_FILE" fi +SHOW_INFO="" +if [ "$INPUT_SHOW_INFO" = "true"]; then + SHOW_INFO="--show-info=true" +fi + if [ -n "$INPUT_SSH_KEY" ] then echo "::group::Keys setup for private repositories" @@ -76,4 +81,4 @@ else fi /composer/vendor/bin/psalm --version -/composer/vendor/bin/psalm --output-format=github $TAINT_ANALYSIS $REPORT $* +/composer/vendor/bin/psalm --output-format=github $TAINT_ANALYSIS $REPORT $SHOW_INFO $*