add(report) -format-csv option (#1034)

This commit is contained in:
gy741
2020-11-05 20:56:19 +09:00
committed by GitHub
parent 93059b74c3
commit ebd3834a35
5 changed files with 66 additions and 2 deletions

View File

@@ -96,6 +96,22 @@ func (w LocalFileWriter) Write(rs ...models.ScanResult) (err error) {
return xerrors.Errorf("Failed to write XML. path: %s, err: %w", p, err)
}
}
if c.Conf.FormatCsvList {
var p string
if c.Conf.Diff {
p = path + "_short_diff.csv"
} else {
p = path + "_short.csv"
}
err := formatCsvList(r, p)
if err == "" {
return xerrors.Errorf("Failed to write CSV. path: %s", p)
}
}
}
return nil
}