Added a header row including the ID to the CSV report. (#2481)

Co-authored-by: John Coffey <jcoffey@gableseng.com>
This commit is contained in:
John Coffey 2020-04-19 12:14:16 -04:00 committed by GitHub
parent 559d6fc873
commit f9074e7b21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,8 @@ bool CsvReport::create()
void CsvReport::writeHeader() void CsvReport::writeHeader()
{ {
// No header for CSV report // Added 5 columns to the header.
mTxtWriter << "File, Line, Severity, Id, Summary" << endl;
} }
void CsvReport::writeFooter() void CsvReport::writeFooter()
@ -61,7 +62,6 @@ void CsvReport::writeError(const ErrorItem &error)
const QString file = QDir::toNativeSeparators(error.errorPath.back().file); const QString file = QDir::toNativeSeparators(error.errorPath.back().file);
QString line = QString("%1,%2,").arg(file).arg(error.errorPath.back().line); QString line = QString("%1,%2,").arg(file).arg(error.errorPath.back().line);
line += QString("%1,%2").arg(GuiSeverity::toString(error.severity)).arg(error.summary); line += QString("%1,%2,%3").arg(GuiSeverity::toString(error.severity)).arg(error.errorId).arg(error.summary);
mTxtWriter << line << endl; mTxtWriter << line << endl;
} }