-
Notifications
You must be signed in to change notification settings - Fork 670
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
GitHub Actions output doesn't reflect warn list settings. #1670
Comments
Indeed this is because current implementation only uses hardcoded/static severity configured by each rule and not really considering the warn_list when computing the level. Fixing this bug may require little bit of refactoring, mainly we should modify the found Matches to record inside them if they were downgraded to warning level by warn_list, so they could also be displayed correctly. In fact I am inclined to think that probably the new implementation will disregard original severity field and only report matches as I am not even sure what was the original reason for introducing the severity field and if someone relies on it. AFAIK, a linter should only report errors and warnings, first one causing a failure and second one being only a message. I am not sure what would count as an "info" level. @webknjaz @tadeboro @felixfontein DYIT? |
Is this being worked on? |
I checked and I am unable to reproduce the bug with latest beta version, all tasks that were marked as warning in Summary report was also using github warning annotations instead of errors. |
This is still an issue |
- Display warnings different than errors on all output formats - Document YAML specific errors - Display warning using yellow AND adding (warning) suffix - Corrected cases where warning was determined incorrectly - Display only the detailed rule tag on matches (reduce clutter) - Capitalize YAML error messages Fixes: ansible#1670
Summary
When run under GitHub actions, ansible-lint's output correctly identifies how many warnings and errors are found according to the Ansible-lint file. However, the output it provides for GitHub Actions doesn't take this into account... causing Errors which are marked down to Warnings to appear in red.
Issue Type
Ansible and Ansible Lint details
OS / ENVIRONMENT
GitHub Actions, python3 environment (example below)
STEPS TO REPRODUCE
Contents of test.yaml:
Desired Behaviour
The output should colorize and label these two problems as warnings (yellow)
Actual Behaviour
Text output indicates the correct count of warnings/errors based on the configuration file.
GitHub PR annotations are labeled according to the default configuration. Things that are warnings are labeled with the word Failure and colored red.
See screenshots
The text was updated successfully, but these errors were encountered: