Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cli_lint_errors_count to java descriptor #1820

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

ansraliant
Copy link
Contributor

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.

Fixes #
Tries to fix an issue when the count of errors reported by checkstyle are not properly parsed.

Proposed Changes

  1. adds cli_lint_errors_count

Readiness Checklist

Author/Contributor

  • Add entry to the CHANGELOG listing the change and linking to the corresponding issue (if appropriate)
  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as breaking if this is a large fundamental change
  • Label as either automation, bug, documentation, enhancement, infrastructure, or performance

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.
@ansraliant ansraliant requested a review from nvuillam as a code owner September 1, 2022 07:11
@codecov-commenter
Copy link

Codecov Report

Merging #1820 (fd765ac) into main (c1cd385) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1820      +/-   ##
==========================================
+ Coverage   84.26%   84.28%   +0.02%     
==========================================
  Files         162      162              
  Lines        4328     4328              
==========================================
+ Hits         3647     3648       +1     
+ Misses        681      680       -1     
Impacted Files Coverage Δ
megalinter/reporters/UpdatedSourcesReporter.py 89.74% <0.00%> (+2.56%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@nvuillam nvuillam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks a lot for your contribution :)

@nvuillam nvuillam merged commit a9be66c into oxsecurity:main Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants