-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
PowerShell linter does not count errors properly #3320
Comments
Does the tool itself have a way of reporting it? It's a bit harder to be smarter than the tool ;) |
Not directly, not that I know. But, as I understand the implementation of the MegaLinter, the two descriptor keys that I mentioned above are able to count the number of occurrences of matches for the In that case, I think that it should be possible to control the order of the columns output from |
Indeed cli_lint_errors_count and cli_lint_errors_regex are the way to count errors using output text :) @efrecon please feel free to add them, even in your current PR about Powershell if you want :) |
Merci @nvuillam. I've started to look at that but stumbled upon the following: If I understand the code correctly, when the
|
I'm not sure I understand your message correctly. If I'm not mistaken, the configuration key DISABLE_ERRORS_LINTERS enables you to have a linter run, but if the linter reports errors, instead of failing the job, it will only report it as warnings. https://megalinter.io/latest/configuration/ Is it a bit what you are trying to achieve? Or you are trying to "upgrade" the existing linter to be able to report both kinds (warnings AND errors) when it does (or doesn't) currently report it when used by itself manually. |
I needed a helping hand. This is now implemented as part of #3318. The implementation places the severity at the beginning of the lines and count the known severity levels in the output. This means that even messages with a severity of I have run the tests as here. They pass. Is there anything I need to do for this to be considered for approval and merge? |
@efrecon if the CI jobs pass, I'll merge the PR :) |
@nvuillam They.. didn't. One line too long, the rest being internal: a network error and a "no space on device error" |
Let's cross fingers for the next run :) I updated your branch from main, the no space left on device has been solved in another PR |
Appears to be solved by #3318 :) |
Describe the bug
The powershell linter does not count errors properly. Instead of reporting the number of errors, it report the number of erroneous files.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The MegaLinter should count the number of errors and probably report warnings as non-blocking errors.
note
I believe this is because the descriptor does not provide a
cli_lint_errors_count
andcli_lint_errors_regex
or similar.The text was updated successfully, but these errors were encountered: