From a9be66c19574cd3e9b94bacae8e8d56d777602f7 Mon Sep 17 00:00:00 2001 From: ansraliant Date: Fri, 2 Sep 2022 01:58:08 +0900 Subject: [PATCH] Add cli_lint_errors_count to java (#1820) In order to parse the amount of errors Checkstyle finds, we need to tell the parser which type of message the linter responds with. In case of checkstyle, it has a message like Checkstyle ends with ([0-9]+) errors which corresponds to `regex_number`. Otherwise megalinter will respond always with 1. --- megalinter/descriptors/java.megalinter-descriptor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/megalinter/descriptors/java.megalinter-descriptor.yml b/megalinter/descriptors/java.megalinter-descriptor.yml index 50a80d1915d..82dd43f5c24 100644 --- a/megalinter/descriptors/java.megalinter-descriptor.yml +++ b/megalinter/descriptors/java.megalinter-descriptor.yml @@ -32,6 +32,7 @@ linters: - sarif - -o - "{{SARIF_OUTPUT_FILE}}" + cli_lint_errors_count: "regex_number" cli_lint_errors_regex: "Checkstyle ends with ([0-9]+) errors" cli_version_extra_args: - "-jar"