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

Reduce the amount of console output in reports with lots of linter warnings #31

Open
bvobart opened this issue Aug 16, 2021 · 0 comments

Comments

@bvobart
Copy link
Owner

bvobart commented Aug 16, 2021

Intermediate results from the mllint survey mentioned that mllint sometimes produces an overwhelming amount of console output, especially when the report contains loads of linter warnings. One line is generated for each warning, so that can make a report hundreds of lines long, which all get printed to the terminal at the same time when analysis finishes.

We can use dynamic hide/show boxes for all the code quality linter warnings with <details> sections in the Markdown file output, but in terminal-rendered Markdown HTML elements are simply ignored, so we need to come up with a substitute for that.

The simplest option would be to omit the linter warnings and only print the amount of messages with perhaps a summary of the severity of the warnings. A flag to re-enable full linter output would then also be useful.

Another option would be to have mllints output open in a pager such as less (or some Golang equivalent like https://github.com/tigrawap/slit for an output that has more lines than the current terminal height. This would reduce the shock of the output suddenly appearing on screen. Though it would still need to be disabled if stdout is not a TTY, such as on CI (in which case it still just prints the entire output). We want to prevent opening a pager in an automated script, as it causes the pager to endlessly wait for user input, blocking the script.

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

No branches or pull requests

1 participant