megalinter icon indicating copy to clipboard operation
megalinter copied to clipboard

npm-groovy-lint is raising a false positive error on GitHub Actions

Open tylervz opened this issue 2 years ago • 0 comments

Describe the bug npm-groovy-lint is reporting it found 1 error when it linted the Groovy files on our branch in the GitHub Actions MegaLinter workflow, but when we expand the report for details it shows that no rules of the "Error" severity were actually broken. I would expect npm-groovy-lint Info and Warning statements to not result in an error, causing the MegaLinter job to fail on GitHub actions.

✅ Linted [REPOSITORY] files with [git_diff] successfully - (0.25s) (expand for details)
❌ Linted [GROOVY] files with [npm-groovy-lint]: Found 1 error(s) - (38.13s) (expand for details)

...

npm-groovy-lint results in 6 linted files:
  ┌─────────┬───────────┬─────────────┐
  │ (index) │ Severity  │ Total found │
  ├─────────┼───────────┼─────────────┤
  │    0    │  'Error'  │      0      │
  │    1    │ 'Warning' │     101     │
  │    2    │  'Info'   │     586     │
  └─────────┴───────────┴─────────────┘
  

+----SUMMARY------+----------------------+---------------+-------+-------+--------+--------------+
| Descriptor      | Linter               | Mode          | Files | Fixed | Errors | Elapsed time |
+-----------------+----------------------+---------------+-------+-------+--------+--------------+
| ✅ EDITORCONFIG | editorconfig-checker | list_of_files |     6 |       |      0 |        0.13s |
| ❌ GROOVY       | npm-groovy-lint      | list_of_files |     6 |       |      1 |       38.13s |
| ✅ REPOSITORY   | checkov              | project       |   n/a |       |      0 |       22.88s |
| ✅ REPOSITORY   | dustilock            | project       |   n/a |       |      0 |         0.8s |
| ✅ REPOSITORY   | git_diff             | project       |   n/a |       |      0 |        0.25s |
| ✅ REPOSITORY   | secretlint           | project       |   n/a |       |      0 |         7.1s |
| ✅ REPOSITORY   | syft                 | project       |   n/a |       |      0 |         2.4s |
| ✅ REPOSITORY   | trivy                | project       |   n/a |       |      0 |        3.71s |
+-----------------+----------------------+---------------+-------+-------+--------+--------------+

The full MegaLinter log of the npm-groovy-lint run can be found here: ERROR-GROOVY_NPM_GROOVY_LINT.log

To Reproduce Steps to reproduce the behavior:

  1. Create or find an existing project that uses Groovy files.
  2. Download our MegaLinter GitHub actions workflow.
  3. Download our MegaLinter config to the root directory of the project.
  4. Download our npm-groovy-lint config to the root directory of the project.

Expected behavior I would expect npm-groovy-lint Info and Warning statements to not result in an error, causing the MegaLinter job to fail on GitHub actions.

tylervz avatar Sep 14 '22 15:09 tylervz