public boolean parse()

in agent/src/jetbrains/buildServer/xmlReportPlugin/parsers/jslint/JSLintReportParser.java [31:63]


  public boolean parse(@NotNull final File file, @Nullable final ParsingResult prevResult) throws ParsingException {
    if (!ParserUtils.isReportComplete(file, "jslint")) {
      return false;
    }

    try {
      new JSLintXmlReportParser(new JSLintXmlReportParser.Callback() {
        @Override
        public void markBuildAsInspectionsBuild() {
          if (myInspectionReporter instanceof TeamCityInspectionReporter) {
            ((TeamCityInspectionReporter)myInspectionReporter).markBuildAsInspectionsBuild();
          }
        }

        public void reportInspection(@NotNull final InspectionResult inspection) {
          ++myWarnings;
          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;
  }