@Test public void test_descriptor() { DefaultSensorDescriptor sensorDescriptor = new DefaultSensorDescriptor(); new GolangCILintReportSensor().describe(sensorDescriptor); assertThat(sensorDescriptor.name()).isEqualTo("Import of GolangCI-Lint issues"); assertThat(sensorDescriptor.languages()).containsOnly("go"); }
@Override public void describe(SensorDescriptor sensorDescriptor) { sensorDescriptor .onlyOnLanguage(GoLanguage.KEY) .onlyWhenConfiguration(conf -> conf.hasKey(PROPERTY_KEY)) .name("Import of GolangCI-Lint issues"); }
GolangCILintReportSensor implements Sensor { @Override public void describe(SensorDescriptor sensorDescriptor) { sensorDescriptor .onlyOnLanguage(GoLanguage.KEY) .onlyWhenConfiguration(conf -> conf.hasKey(PROPERTY_KEY)) .name("Import of GolangCI-Lint issues"); } }
GolangCILintReportSensor implements Sensor { @Override public void describe(SensorDescriptor sensorDescriptor) { sensorDescriptor .onlyOnLanguage(GoLanguage.KEY) .onlyWhenConfiguration(conf -> conf.hasKey(PROPERTY_KEY)) .name("Import of GolangCI-Lint issues"); }  }
GolangCILintReportSensor implements Sensor { @Override public void describe(SensorDescriptor sensorDescriptor) { sensorDescriptor .onlyOnLanguage(GoLanguage.KEY) .onlyWhenConfiguration(conf -> conf.hasKey(PROPERTY_KEY)) .name("Import of GolangCI-Lint issues"); }  @Override void describe(SensorDescriptor sensorDescriptor); @Override void execute(SensorContext context); }
GolangCILintReportSensor implements Sensor { @Override public void describe(SensorDescriptor sensorDescriptor) { sensorDescriptor .onlyOnLanguage(GoLanguage.KEY) .onlyWhenConfiguration(conf -> conf.hasKey(PROPERTY_KEY)) .name("Import of GolangCI-Lint issues"); }  @Override void describe(SensorDescriptor sensorDescriptor); @Override void execute(SensorContext context); static final String LINTER_KEY; static final String PROPERTY_KEY; }