private void processFile(File baseDir, String filePath, RuleSet ruleSet) {
File file = new File(baseDir, filePath);
SourceFile sourceFile = new SourceFile(file);
List<Violation> allViolations = collectViolations(sourceFile, ruleSet);
FileResults fileResults = null;
if (allViolations != null && !allViolations.isEmpty()) {
fileResults = new FileResults(PathUtil.normalizePath(filePath), allViolations);
}
String parentPath = PathUtil.getParentPath(filePath);
String safeParentPath = parentPath != null ? parentPath : "";
addToResultsMap(safeParentPath, fileResults);
incrementFileCount(safeParentPath);