Update conditions to create an Issue
@@ -30,7 +30,7 @@ public class PolyspaceParser extends IssueParser {
@Override
public Report parse(final ReaderFactory reader) throws ParsingException {
- try (Stream<String> lines = reader.readStream()) {
+ try (Stream<String> lines = reader.readStream().skip(1)) {
return parse(lines);
}
catch (UncheckedIOException e) {
@@ -66,6 +66,8 @@ public class PolyspaceParser extends IssueParser {
}
String[] attributes = line.split("\\t", limit);
+ if(equalsIgnoreCase(attributes[9],"Unreviewed") || equalsIgnoreCase(attributes[9],"To investigate")
+ || equalsIgnoreCase(attributes[9],"To fix") || equalsIgnoreCase(attributes[9],"Other")) {
builder.setFileName(attributes[8]);
builder.setCategory(attributes[2]);
builder.setDescription(attributes[1]);
@@ -74,9 +76,11 @@ public class PolyspaceParser extends IssueParser {
builder.setColumnStart(attributes[colNumber]);
builder.setLineStart(attributes[lineNumber]);
builder.setSeverity(mapPriority(attributes));
+ builder.setAdditionalProperties(attributes[0]);
report.add(builder.build());
}
+ }
return report;
}
}
