Allow warning-count in status output to be styled#1675
Allow warning-count in status output to be styled#1675rolandwalker wants to merge 1 commit intomainfrom
Conversation
No direct security issues found in this diff. |
Allow warning-count in status-footer output to have its own style, "output.status.warning-count". Add a "warnings.status.warning-count" for completeness, though warnings styles remain undocumented for now. "output.status" still has a style, and both styles are applied, so if "output.status" is italic, and "output.status.warning-count" is red, then the output of the warning count will be red+italic. A "status_plain" property is added to SQLResult, since we are still often interested in the plain value, for string matches and calculating width. Mycli.output now takes a SQLResult rather than a textual "status". A number of tests have to be updated to account for the above two structural changes, and one test assertion on the new style is added.
6ddd69a to
9bbaf85
Compare
scottnemes
left a comment
There was a problem hiding this comment.
Verified new formatting for warning count works as expected.
Description
Allow warning-count in status-footer output to have its own style,
output.status.warning-count. Add awarnings.status.warning-countfor completeness, though warnings styles remain undocumented for now.output.statusstill has a style, and both styles are applied, so ifoutput.statusis italic, andoutput.status.warning-countis red, then the output of the warning count will be red+italic.A
status_plainproperty is added toSQLResult, since we are still often interested in the plain value, for string matches and calculating width.Mycli.outputnow takes aSQLResultrather than a textualstatus.A number of tests have to be updated to account for the above two structural changes, and one test assertion on the new style is added.
Example:
This is definitely how I will prefer to consume warning notifications (vs
\W), and it is again tempting to change the default.Checklist
changelog.mdfile.AUTHORSfile (or it's already there).