Conversation
|
Thanks for your contribution. Please add a unit tests for this. |
|
|
||
| // Default template format.. | ||
| if (mSettings.templateFormat.empty()) { | ||
| mSettings.templateFormat = "{bold}{file}:{line}:{column}: {red}{inconclusive:{magenta}}{severity}:{inconclusive: inconclusive:}{default} {message} [{id}]{reset}\\n{code}"; |
There was a problem hiding this comment.
This removes the downgrade of red to magenta for inconclusive findings.
lib/errorlogger.cpp
Outdated
| pos1 = result.find("{inconclusive:", pos1); | ||
| } | ||
| findAndReplace(result, "{severity}", severityToString(severity)); | ||
| std::string sseverity = coloredSeverityToString(severity); |
There was a problem hiding this comment.
This would introduce coloring even if it has been disabled. If you provide a custom template you need to provide the colors yourself.
It seems like this is actually a missing feature being able to specify colored severities. So this probably needs to be a separate macro.
13568d7 to
8df610d
Compare
|
Added now unit-tests, but there's still the issue with custom templates, and magenta for inconclusive downgrade. |
| void ErrorMessageColorized() const { | ||
| const bool oDisableColors = gDisableColors; | ||
| gDisableColors = false; | ||
| setenv("CLICOLOR_FORCE", "1", 1); |
There was a problem hiding this comment.
Thanks. Since it requires you to modify the environment this should be implemented as a Python test instead. This should probably live next to the ones added when CLICOLOR_FORCE was introduced.
c4441cf to
0944fd0
Compare
0944fd0 to
4d61d3c
Compare
e88e91b to
1459984
Compare
|
b5431c8 to
0ffb266
Compare
esp. information as red was disturbing.
0ffb266 to
0659856
Compare
|



esp. information as red was disturbing