@Test public void test() { File moduleBaseDir = new File("src/main/resources"); try { AnsibleSensor sensor = new AnsibleSensor(new DefaultFileSystem(moduleBaseDir)); DummySensorDescriptor descriptor = new DummySensorDescriptor(); sensor.describe(descriptor); assertEquals("Ansible Lint Sensor", descriptor.sensorName); assertEquals(YamlLanguage.KEY, descriptor.languageKey); } catch (Exception e) { fail("Sensor constructor should not fail: " + e.getMessage()); } }
@Override public void describe(SensorDescriptor descriptor) { descriptor.onlyOnLanguage(YamlLanguage.KEY); descriptor.name("Ansible Lint Sensor"); }
AnsibleSensor extends AbstractAnsibleSensor { @Override public void describe(SensorDescriptor descriptor) { descriptor.onlyOnLanguage(YamlLanguage.KEY); descriptor.name("Ansible Lint Sensor"); } }
AnsibleSensor extends AbstractAnsibleSensor { @Override public void describe(SensorDescriptor descriptor) { descriptor.onlyOnLanguage(YamlLanguage.KEY); descriptor.name("Ansible Lint Sensor"); } AnsibleSensor(FileSystem fileSystem); }
AnsibleSensor extends AbstractAnsibleSensor { @Override public void describe(SensorDescriptor descriptor) { descriptor.onlyOnLanguage(YamlLanguage.KEY); descriptor.name("Ansible Lint Sensor"); } AnsibleSensor(FileSystem fileSystem); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); }
AnsibleSensor extends AbstractAnsibleSensor { @Override public void describe(SensorDescriptor descriptor) { descriptor.onlyOnLanguage(YamlLanguage.KEY); descriptor.name("Ansible Lint Sensor"); } AnsibleSensor(FileSystem fileSystem); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context);  }