in agent/src/jetbrains/buildServer/xmlReportPlugin/parsers/pmd/PmdReportParser.java [32:66]
public boolean parse(@NotNull final File file, @Nullable final ParsingResult prevResult) throws ParsingException {
if (!ParserUtils.isReportComplete(file, "pmd")) {
return false;
}
try {
new PmdXmlReportParser(new PmdXmlReportParser.Callback() {
public void reportInspection(@NotNull final InspectionResult inspection) {
switch (inspection.getPriority()) {
case 1:
++myErrors;
break;
case 2:
++myWarnings;
break;
default:
++myInfos;
}
myInspectionReporter.reportInspection(inspection);
}
public void reportInspectionType(@NotNull final InspectionTypeResult inspectionType) {
myInspectionReporter.reportInspectionType(inspectionType);
}
@Override
public void error(@NotNull final String message) {
myInspectionReporter.error(message);
}
}).parse(file);
} catch (IOException e) {
throw new ParsingException(e);
}
return true;
}