forked from lix-project/lix
don't print blank lines for blank description
This commit is contained in:
parent
d8d4844b88
commit
cdac083dc5
|
@ -88,7 +88,7 @@ void printCodeLines(const string &prefix, const NixCode &nixCode)
|
||||||
std::ostream& operator<<(std::ostream &out, const ErrorInfo &einfo)
|
std::ostream& operator<<(std::ostream &out, const ErrorInfo &einfo)
|
||||||
{
|
{
|
||||||
int errwidth = 80;
|
int errwidth = 80;
|
||||||
string prefix = " ";
|
string prefix = "";
|
||||||
|
|
||||||
string levelString;
|
string levelString;
|
||||||
switch (einfo.level) {
|
switch (einfo.level) {
|
||||||
|
@ -176,8 +176,10 @@ std::ostream& operator<<(std::ostream &out, const ErrorInfo &einfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
// description
|
// description
|
||||||
out << prefix << einfo.description << std::endl;
|
if (einfo.description != "") {
|
||||||
out << prefix << std::endl;
|
out << prefix << einfo.description << std::endl;
|
||||||
|
out << prefix << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// lines of code.
|
// lines of code.
|
||||||
if (einfo.nixCode.has_value() && einfo.nixCode->errLineOfCode != "") {
|
if (einfo.nixCode.has_value() && einfo.nixCode->errLineOfCode != "") {
|
||||||
|
|
Loading…
Reference in a new issue