Super-linter: Superlinter incorrectly reports languages linted

Created on 24 Aug 2020  路  2Comments  路  Source: github/super-linter

Describe the bug
The super-linter API over reports languages linted when adding the status to a pull request.

For example a recent PR in my repo has the following:
Super-Linter Test Results
I have no Java or R code in my repo.

I noticed it particularly since the R linter was added and have a theory.

What I suspect is happening is to do with this line of code:

https://github.com/github/super-linter/blob/0e075ccba96327a6d5dec6cc264ad7c06862e352/lib/linter.sh#L1111

which then goes on to call CallStatusAPI.

I suspect it's saying "JAVA" is in "JAVASCRIPT_ES", and "R" is in "JAVASCRIPT_ES" and also "MARKDOWN", hence why they are being include for reporting (with 0 errors since they weren't actually run).

This Stackoverflow answer gives a better method to test if a value is in an array by adding spaces on either side.

To Reproduce
Steps to reproduce the behavior:

  1. Lint a repo with no R files but with markdown files (README.md will do)
  2. Open a PR with an edit to the README.md
  3. Note that R is included as a linted language

Expected behavior
The linter should only list languages actually linted. Especially when you explicitly enable only the languages you want (as I do) and R is not enabled.

Screenshots
As per above

Additional context
Theory given above.

bug

Most helpful comment

@aayushsanghavi the code base changed a lot since this issue was opened. I think you're experiencing a different problem.

Can you open a new issue, and attach a log after setting ACTION_RUNNER_DEBUG=true? thanks!

All 2 comments

Describe the bug
For commits involving changes in Java files, the ansible linter is somehow invoked, it finds no issues and finishes the lint checks.

Console output of the github actions ci

2020-10-22 10:33:15 [INFO  ]   ------ File list to check: ------
2020-10-22 10:33:15 [INFO  ]   ---------------------------------
2020-10-22 10:33:15 [INFO  ]   ----------------------------------------------
2020-10-22 10:33:15 [INFO  ]   Successfully gathered list of files...
2020-10-22 10:33:15 [INFO  ]   ----------------------------------------------
2020-10-22 10:33:15 [INFO  ]   ----------------------------------------------
2020-10-22 10:33:15 [INFO  ]   Linting [Ansible] files...
2020-10-22 10:33:15 [INFO  ]   ----------------------------------------------
2020-10-22 10:33:15 [INFO  ]   ----------------------------------------------
2020-10-22 10:33:17 [INFO  ]   ----------------------------------------------
2020-10-22 10:33:17 [INFO  ]   ----------------------------------------------
2020-10-22 10:33:17 [INFO  ]   Generated reports:

with VALIDATE_ALL_CODEBASE: false

It worked as expected for changes in markdown and yaml files though.

Expected behaviour
Only the Java linter should run

@aayushsanghavi the code base changed a lot since this issue was opened. I think you're experiencing a different problem.

Can you open a new issue, and attach a log after setting ACTION_RUNNER_DEBUG=true? thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

patrick-compass picture patrick-compass  路  4Comments

bbaassssiiee picture bbaassssiiee  路  5Comments

dshevtsov picture dshevtsov  路  4Comments

brunomartinspro picture brunomartinspro  路  4Comments

zkoppert picture zkoppert  路  3Comments