@Test void skip_issue_on_invalid_priority() throws IOException { List<ExternalIssue> externalIssues = execute("invalid-severity.xml"); assertThat(externalIssues).hasSize(1); assertThat(logTester.logs(LoggerLevel.WARN).get(0)) .contains("Can't import issue at line 8") .contains("invalid-severity.xml"); assertThat(logTester.logs(LoggerLevel.WARN).get(1)) .contains("Can't import issue at line 9") .contains("invalid-severity.xml"); }
@Override public void execute(SensorContext context) { List<File> reportFiles = ExternalReportProvider.getReportFiles(context, REPORT_PROPERTY_KEY); reportFiles.forEach(report -> importIfExist(LINTER_NAME, context, report, PmdSensor::importReport)); }
PmdSensor implements Sensor { @Override public void execute(SensorContext context) { List<File> reportFiles = ExternalReportProvider.getReportFiles(context, REPORT_PROPERTY_KEY); reportFiles.forEach(report -> importIfExist(LINTER_NAME, context, report, PmdSensor::importReport)); } }
PmdSensor implements Sensor { @Override public void execute(SensorContext context) { List<File> reportFiles = ExternalReportProvider.getReportFiles(context, REPORT_PROPERTY_KEY); reportFiles.forEach(report -> importIfExist(LINTER_NAME, context, report, PmdSensor::importReport)); }  }
PmdSensor implements Sensor { @Override public void execute(SensorContext context) { List<File> reportFiles = ExternalReportProvider.getReportFiles(context, REPORT_PROPERTY_KEY); reportFiles.forEach(report -> importIfExist(LINTER_NAME, context, report, PmdSensor::importReport)); }  @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); }
PmdSensor implements Sensor { @Override public void execute(SensorContext context) { List<File> reportFiles = ExternalReportProvider.getReportFiles(context, REPORT_PROPERTY_KEY); reportFiles.forEach(report -> importIfExist(LINTER_NAME, context, report, PmdSensor::importReport)); }  @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); static final String REPORT_PROPERTY_KEY; static final String LINTER_KEY; static final ExternalRuleLoader RULE_LOADER; }