Skip to content

Commit

Permalink
Fix cnescatlab#69 + Value column - Cricity column
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar WALDMANN committed Aug 2, 2017
1 parent ad7c429 commit 605a2e4
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,15 @@ public ExportCsv() {
public void export(List<CheckResult> checkResults, File outputFile,
Map<String, String> parameters) throws IOException {
final FileWriter writer = new FileWriter(outputFile);
writer.write("Rule, File, Location, Value, Criticity\n");
writer.write("Rule, File, Location, Line, Value\n");
for (final CheckResult checkResult : checkResults) {
writer.write(checkResult.getName() + "," + checkResult.getFile().getAbsolutePath() + ","
+ checkResult.getLocation() + "," + checkResult.getLine().toString() + "\n");
if(checkResult.getValue()!=null){
writer.write(checkResult.getName() + "," + checkResult.getFile().getAbsolutePath() + ","
+ checkResult.getLocation() + "," + checkResult.getLine().toString() + "," + checkResult.getValue()+"\n");
}else{
writer.write(checkResult.getName() + "," + checkResult.getFile().getAbsolutePath() + ","
+ checkResult.getLocation() + "," + checkResult.getLine().toString() + ", -- \n");
}
}

writer.close();
Expand Down

0 comments on commit 605a2e4

Please sign in to comment.