nevinera / quiet_quality

A system for finding and annotating quality issues on your forward diffs
MIT License
12 stars 0 forks source link

Add (limited) columnization for message output #95

Closed nevinera closed 11 months ago

nevinera commented 1 year ago

Right now, the message output from normal logging mode is completely ragged, which makes it hard to read.

The file-paths could be quite long, but are at least likely not to vary a great deal; the tool names are uniformly short. But the rule-names could vary substantially - I'd suggest giving them a maximum column width, and letting them overflow past it, such that rows with really long rule names just bust their column and start their message-body in the wrong place. Probably 60 characters is a reasonable limit?

nevinera commented 11 months ago

Perhaps we should just go unix here, and support a tab-separated output (not true tsv), specifically intended to be fed into column -s $'\t' -t? Wish there were a simpler command to use, but column -t by default splits on whitespace, which is not ideal.

nevinera commented 11 months ago

Actually, this isn't going to help - the shapes are too varied. Instead, let's take a cue from git, and support a formatting string. Alongside '-n', let's take --message-format="%ABCDNAME%A.BNAME", where each sigil takes two values and a string.

For example --message-format="%lbred40tool %lmcyan20rule"