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

[Bug]: show "stylish" output #324

Closed
alexeagle opened this issue Jul 10, 2024 · 1 comment · Fixed by #331
Closed

[Bug]: show "stylish" output #324

alexeagle opened this issue Jul 10, 2024 · 1 comment · Fixed by #331
Labels
bug Something isn't working

Comments

@alexeagle
Copy link
Member

alexeagle commented Jul 10, 2024

What happened?

In #140 I changed the formatter for eslint to the "compact" format, with reasoning explained in the PR.

However the stylish output is nicer for human-readability. Other linters have the same problem to a greater extent (perhaps tflint for example). The "machine-readable" output that https://github.com/reviewdog/errorformat can parse (e.g. for the editor to make the line:column clickable) is not nearly as nice as "human-readable" output.

Version

HEAD

How to reproduce

No response

Any other information?

Proposal is to add a flag like --@aspect_rules_lint//lint:output-machine-readable which tells any linter implementation that is aware of it to produce a machine-readable output. That could be a "compact" format, or perhaps the linter produces SARIF format directly so that no futher parsing is needed.

Note, for compatibility with tools that already wrap rules_lint, we may want to have a different report filename in the machine-readable case so those tools can be conditional in how they parse the report file.

@alexeagle alexeagle added the bug Something isn't working label Jul 10, 2024
@alexeagle alexeagle changed the title [Bug]: show eslint "stylish" output [Bug]: show "stylish" output Jul 12, 2024
@alexeagle
Copy link
Member Author

alexeagle commented Jul 12, 2024

as another example, when Vale is run with --output=CLI it prints the diagnostic level, which users need to understand whether they configured their errors vs. warnings correctly

Screenshot 2024-07-12 at 2 18 40 PM

However currently we use --output=line with Vale to make it machine-parseable, and so we lose the severity (as well as the nice coloring)

alexeagle added a commit that referenced this issue Jul 16, 2024
Configure linters to be colored and produce prettier output for this new output.
Change lint.sh to present this output rather than the 'report' output which is machine-readable

Fixes #324
alexeagle added a commit that referenced this issue Jul 16, 2024
Configure linters to be colored and produce prettier output for this new output.
Change lint.sh to present this output rather than the 'report' output which is machine-readable

Fixes #324
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant