Skip to content

Commit

Permalink
Add cli_lint_errors_count to java (#1820)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ansraliant authored Sep 1, 2022
1 parent c1cd385 commit a9be66c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions megalinter/descriptors/java.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a9be66c

Please sign in to comment.