Skip to content

Commit

Permalink
Fix NullPointerException #80
Browse files Browse the repository at this point in the history
Handle file not found condition - skipping violation was not handle
correctly
  • Loading branch information
Bertk committed Dec 28, 2013
1 parent 49baf20 commit df4d070
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ protected void saveViolation(Project project, SensorContext context, String rule
CxxUtils.LOG.warn("Skipping invalid line number: {}", line);
}
}
// file level violation
violation.setMessage(msg);
context.saveViolation(violation);
} else {
CxxUtils.LOG.warn("Cannot find the file '{}', skipping violation '{}'", file, msg);
}
Expand Down

0 comments on commit df4d070

Please sign in to comment.