@Test public void should_ignore_report_on_older_sonarqube() throws Exception { context.setRuntime(getRuntime(7, 1)); setReport("report.json"); stylelintReportSensor.execute(context); assertThat(context.allExternalIssues()).isEmpty(); assertThat(logTester.logs(LoggerLevel.ERROR)).contains("Import of external issues requires SonarQube 7.2 or greater."); }
@Override public void execute(SensorContext context) { List<File> reportFiles = ExternalReportProvider.getReportFiles(context, CssPlugin.STYLELINT_REPORT_PATHS); reportFiles.forEach(report -> importReport(report, context)); }
StylelintReportSensor implements Sensor { @Override public void execute(SensorContext context) { List<File> reportFiles = ExternalReportProvider.getReportFiles(context, CssPlugin.STYLELINT_REPORT_PATHS); reportFiles.forEach(report -> importReport(report, context)); } }
StylelintReportSensor implements Sensor { @Override public void execute(SensorContext context) { List<File> reportFiles = ExternalReportProvider.getReportFiles(context, CssPlugin.STYLELINT_REPORT_PATHS); reportFiles.forEach(report -> importReport(report, context)); } StylelintReportSensor(CheckFactory checkFactory); }
StylelintReportSensor implements Sensor { @Override public void execute(SensorContext context) { List<File> reportFiles = ExternalReportProvider.getReportFiles(context, CssPlugin.STYLELINT_REPORT_PATHS); reportFiles.forEach(report -> importReport(report, context)); } StylelintReportSensor(CheckFactory checkFactory); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); static ExternalRuleLoader getStylelintRuleLoader(); }
StylelintReportSensor implements Sensor { @Override public void execute(SensorContext context) { List<File> reportFiles = ExternalReportProvider.getReportFiles(context, CssPlugin.STYLELINT_REPORT_PATHS); reportFiles.forEach(report -> importReport(report, context)); } StylelintReportSensor(CheckFactory checkFactory); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); static ExternalRuleLoader getStylelintRuleLoader(); static final String STYLELINT; }