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

Surfacing warnings during successful runs #4556

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Surfacing warnings during successful runs #4556

wants to merge 7 commits into from

Conversation

bdovaz
Copy link
Collaborator

@bdovaz bdovaz commented Jan 21, 2025

Changed code so that the console shows a new tab called "warnings" which shows a list of warnings. Added the regex to .yaml files for both errors and warnings as a way to display the warnings
Even when there are no errors, warnings will now show in the console and be displayed
Developers can also add their own regex to each descriptor to count warnings

TODO: Add the warnings to additional reporters

Fixes #4476

Proposed Changes

  1. New schema additions, regex of warnings and warning count
  2. Warning displayed on the console and other reporters in the future
  3. .yaml file regex as yaml linter can very easily be counted

Readiness Checklist

Run megalinter and there should now be a warning tab. Only .yaml files at the current moment support the counting of warnings. Other files will need additional regex to be written.

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

Copy link
Contributor

github-actions bot commented Jan 21, 2025

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ API spectral 1 0 0 1.72s
⚠️ BASH bash-exec 6 1 0 0.03s
✅ BASH shellcheck 6 0 0 0.25s
✅ BASH shfmt 6 0 0 0 0.9s
✅ COPYPASTE jscpd yes no no 2.68s
✅ DOCKERFILE hadolint 129 0 0 24.53s
✅ JSON jsonlint 20 0 0 0.18s
✅ JSON v8r 22 0 0 15.61s
⚠️ MARKDOWN markdownlint 267 0 302 0 22.52s
✅ MARKDOWN markdown-table-formatter 267 0 0 0 162.38s
⚠️ PYTHON bandit 215 66 0 3.64s
✅ PYTHON black 215 0 0 0 4.45s
✅ PYTHON flake8 215 0 0 1.98s
✅ PYTHON isort 215 0 0 0 1.2s
✅ PYTHON mypy 215 0 0 18.42s
✅ PYTHON pylint 215 0 0 35.46s
✅ PYTHON ruff 215 0 0 0 0.71s
✅ REPOSITORY checkov yes no no 35.55s
✅ REPOSITORY git_diff yes no no 0.89s
⚠️ REPOSITORY grype yes 26 no 12.41s
✅ REPOSITORY secretlint yes no no 11.61s
✅ REPOSITORY trivy yes no no 15.71s
✅ REPOSITORY trivy-sbom yes no no 0.28s
⚠️ REPOSITORY trufflehog yes 1 no 54.01s
✅ SPELL cspell 718 0 0 12.22s
⚠️ SPELL lychee 349 25 0 8.87s
✅ XML xmllint 3 0 0 0 0.86s
✅ YAML prettier 160 0 0 0 3.85s
✅ YAML v8r 102 0 0 30.16s
✅ YAML yamllint 161 0 0 3.16s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

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.

Allow linters to report warnings
2 participants