From a8cde0bbe91ce9ea5c176dd458bc6d7b45eb349b Mon Sep 17 00:00:00 2001 From: nvuillam Date: Wed, 8 Dec 2021 20:40:41 +0100 Subject: [PATCH] SARIF Management for PHP PSALM --- CHANGELOG.md | 1 + megalinter/descriptors/php.megalinter-descriptor.yml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 591ad2594dd..5bc4af20d71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ Note: Can be used with `megalinter/megalinter@beta` in your GitHub Action mega-l - eslint - gitleaks - hadolint + - psalm - trivy - Descriptors: diff --git a/megalinter/descriptors/php.megalinter-descriptor.yml b/megalinter/descriptors/php.megalinter-descriptor.yml index b5d80ca1e25..a917037d69b 100644 --- a/megalinter/descriptors/php.megalinter-descriptor.yml +++ b/megalinter/descriptors/php.megalinter-descriptor.yml @@ -123,6 +123,7 @@ linters: # PSALM - linter_name: psalm name: PHP_PSALM + can_output_sarif: true linter_url: https://psalm.dev linter_repo: https://github.com/vimeo/psalm linter_rules_url: https://psalm.dev/docs/running_psalm/issues/ @@ -132,6 +133,8 @@ linters: config_file_name: psalm.xml cli_lint_mode: list_of_files cli_config_arg_name: "--config=" + cli_sarif_args: + - "--report={{SARIF_OUTPUT_FILE}}" version_extract_regex: "((\\d+(\\.\\d+)+)|Psalm (.*)@)" cli_lint_errors_count: regex_number cli_lint_errors_regex: "([0-9]+) error"