-
Notifications
You must be signed in to change notification settings - Fork 283
Console colors #3015
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
Console colors #3015
Conversation
This will be hard to test: The effect is only visible when output is not redirected. |
652589b
to
0033340
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essentially items 3 and 7 of the PR checklist. Please don't assign others when those cannot (yet) be ticked as it really means that the focus when reviewing shifts from the meat of the work to those superficial bits.
#endif | ||
} | ||
|
||
std::string console_message_handlert::command(unsigned c) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing documentation. The name does not in an obvious way relate to it's functionality, and what values c
should take is a mystery.
protected: | ||
const bool always_flush; | ||
bool is_a_tty; | ||
bool use_SGR; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
return m; | ||
} | ||
|
||
std::string command(unsigned c) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs.
src/util/message.h
Outdated
return std::string(); | ||
} | ||
|
||
// return to default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the "default"? Default of what? Also: not Doxygen.
src/util/message.h
Outdated
return command(0); | ||
} | ||
|
||
// set red foreground color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doxygen, please.
src/util/ui_message.cpp
Outdated
: uit::PLAIN, | ||
cmdline.isset("xml-ui") | ||
? uit::XML_UI | ||
: cmdline.isset("json-ui") ? uit::JSON_UI : uit::PLAIN, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also spurious clang-format change.
src/util/ui_message.cpp
Outdated
: cmdline.get_value("timestamp") == "wall" | ||
? timestampert::clockt::WALL_CLOCK | ||
: timestampert::clockt::NONE | ||
: timestampert::clockt::NONE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-format has had fun. Manually reverted.
580f708
to
b370920
Compare
d0f7727
to
2c09f3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passed Diffblue compatibility checks (cbmc commit: 2c09f3b).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/85603358
2c09f3b
to
8a40b36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passed Diffblue compatibility checks (cbmc commit: 8a40b36).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/85897347
src/util/message.h
Outdated
} | ||
|
||
/// return to default formatting | ||
/// return to default formatting, as defined by clienta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"clienta" is probably a typo, but I wouldn't understand what the "client" is either.
Nit-pick: Change is in the wrong commit (should just be part of the original commit introducing the documentation).
This enables colorful formatting of any message printed through the messaget API. Server-side implementation is provided for Windows and Unix consoles.
Failed properties are red, passing ones are green, and the overall result is in bold.
This mimicks what newer versions of gcc do.
the summary result is now bold
8a40b36
to
d999a3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passed Diffblue compatibility checks (cbmc commit: d999a3e).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/85985276
Uh oh!
There was an error while loading. Please reload this page.