Canop / bacon

background rust code check
https://dystroy.org/bacon
GNU Affero General Public License v3.0
1.95k stars 72 forks source link

Show additional info (crate and or duration) in test titles #218

Open Canop opened 1 month ago

Canop commented 1 month ago

Rationale for showing the crate given here by @DragonDev1906.

The duration would be only available when it can be parsed from the output (i.e. when the tests are done with nextest).

The reason I'm a little reluctant is I try to keep the display uncluterred for easier reading, and I try to make bacon usable in a thin terminal.

Opinions welcome.

DragonDev1906 commented 1 month ago

and I try to make bacon usable in a thin terminal.

Good point with the thin terminal. How difficult would it be to only show this extra information (crate + time) if the terminal is wide enough? That way you could temporarily full-screen the terminal and get more information.

Canop commented 1 month ago

This wouldn't be terribly hard, I do this kind of auto-ellipsis all the time in eg broot.

But this kind of collides wit the wrapping feature: what if people start to want the crate, duration even when it means the line is wrapped?

Canop commented 1 month ago

I made it a separate issue because I'll try to merge the PR #212 so that I can more easily manage various small issues.

DragonDev1906 commented 1 month ago

But this kind of collides wit the wrapping feature: what if people start to want the crate, duration even when it means the line is wrapped?

I doubt that's the case, as at that point the rest of the issue description gets difficult enough to read that you probably don't want even more information. Unless you have really long module names/import paths, so perhaps having it configurable does make sense.

2024-10-01-180014_496x321_scrot