public void validate(ExternalIssueReport report, Path reportPath) {
    if (report.rules != null && report.issues != null) {
      Set<String> ruleIds = validateRules(report.rules, reportPath);
      validateIssuesCctFormat(report.issues, ruleIds, reportPath);
    } else if (report.rules == null && report.issues != null) {
      String documentationLink = documentationLinkGenerator.getDocumentationLink(DOCUMENTATION_SUFFIX);
      LOGGER.warn("External issues were imported with a deprecated format which will be removed soon. " +
        "Please switch to the newest format to fully benefit from Clean Code: {}", documentationLink);
      validateIssuesDeprecatedFormat(report.issues, reportPath);
    } else {
      throw new IllegalStateException(String.format("Failed to parse report '%s': invalid report detected.", reportPath));
    }
  }
@Test
  public void validate_whenDeprecatedReportFormat_shouldValidateWithWarningLog() throws IOException {
    ExternalIssueReport report = read(DEPRECATED_REPORTS_LOCATION);
    assertThatCode(() -> validator.validate(report, reportPath)).doesNotThrowAnyException();
    assertWarningLog();
  }