megalinter
megalinter copied to clipboard
Surfacing warnings during successful runs
Fixes #1541.
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
Proposed Changes
- New schema additions, regex of warnings and warning count
- Warning displayed on the console and other reporters in the future
- .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
- [ ] 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
, orperformance
That's a great initiative, I was thinking about it for some time now, thanks for implementing it :) Please could use also update Github & Gitlab reporter classes ? And if possible add warning properties in more descriptors than just yaml :)
Yup sounds good. If you happen to know any of the regex of those other files, that would be great. I'll push another commit in the coming days!
I do not (so many linters ^^) but my pattern is the following:
- copy-paste the result of a linter in https://regex101.com/
- try until I find the good regexes :D
I used to store test classes success and error logs and display them in online doc, but since v6 it seems i've lost that... i'll try to find why and fix it ^^
jscpd makes a convenient test repository as it contains test files of many different extensions one could run MegaLinter on to view sample linter output for all linters.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
If you think this pull request should stay open, please remove the O: stale 🤖
label or comment on the pull request.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
If you think this pull request should stay open, please remove the O: stale 🤖
label or comment on the pull request.