-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Feat: improve the report readability by indenting sections #382
Comments
Do you mean that the output in the VS Code terminal can be collapsed if indented, or are you copying the contents into the VS Code editor manually? I guess the latter, just checking to be sure about expectations here. |
What I do is that I redirect knip's output to a file: Here's an example of what I'd like the output to be:
Making lines distinguishable would also simplify parsing the command output to perform post-processing. Ideally, we would have a JSON format output, but that would be another feature request which would also be very closes to the out-of-scope issue #41. |
Thanks for the feedback! A JSON reporter already exists: https://knip.dev/features/reporters/ It's also possible to create a custom reporter to print exactly what you want. Maybe I could add an |
Gave it another thought and decided not to work on it myself now. I would be happy to discuss/review a PR that introduces this. Knip supports custom reporters as well. By the way, for you or future me: there's also https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines for expandable groups to do something similar in GitHub Actions. Thanks for the input! |
When I run
knip
on my codebase, it runs for a one or two minutes and produces a report of more than 900 lines. This is why I've opted to save the command output to a file:yarn knip | tee knip3.txt | less
. Once this is done though, it remains hard to distinguish the sections of the report. Therefore it would be nice if in the report, the errors listed in each section could be indented by e.g. two spaces. This would enable VSCode users to collapse the report sections.Thanks!
The text was updated successfully, but these errors were encountered: