Report json fixes (#181)
* Move "No paths found." reporting * delete ends * Smallfix
This commit is contained in:
parent
068183a49f
commit
aaa9d2d377
|
|
@ -335,7 +335,7 @@ void
|
||||||
ReportPath::reportPathEnds(PathEndSeq *ends)
|
ReportPath::reportPathEnds(PathEndSeq *ends)
|
||||||
{
|
{
|
||||||
reportPathEndHeader();
|
reportPathEndHeader();
|
||||||
if (ends) {
|
if (ends && !ends->empty()) {
|
||||||
PathEndSeq::Iterator end_iter(ends);
|
PathEndSeq::Iterator end_iter(ends);
|
||||||
PathEnd *prev_end = nullptr;
|
PathEnd *prev_end = nullptr;
|
||||||
while (end_iter.hasNext()) {
|
while (end_iter.hasNext()) {
|
||||||
|
|
@ -344,6 +344,10 @@ ReportPath::reportPathEnds(PathEndSeq *ends)
|
||||||
prev_end = end;
|
prev_end = end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if (format_ != ReportPathFormat::json)
|
||||||
|
report_->reportLine("No paths found.");
|
||||||
|
}
|
||||||
reportPathEndFooter();
|
reportPathEndFooter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -512,13 +512,8 @@ report_path_cmd(PathRef *path)
|
||||||
void
|
void
|
||||||
report_path_ends(PathEndSeq *ends)
|
report_path_ends(PathEndSeq *ends)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta::sta()->reportPathEnds(ends);
|
||||||
Report *report = sta->report();
|
delete ends;
|
||||||
ReportPathFormat path_format = sta->reportPath()->pathFormat();
|
|
||||||
if (path_format == ReportPathFormat::json || (ends && ends->size() > 0))
|
|
||||||
sta->reportPathEnds(ends);
|
|
||||||
else
|
|
||||||
report->reportLine("No paths found.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue