PythonSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(Python.KEY) .name("Python Sensor") .onlyOnFileType(Type.MAIN); } PythonSensor(FileLinesContextFactory fileLinesContextFactory, CheckFactory checkFactory, NoSonarFilter noSonarFilter);  PythonSensor(FileLinesContextFactory fileLinesContextFactory, CheckFactory checkFactory, NoSonarFilter noSonarFilter,
                      @Nullable PythonCustomRuleRepository[] customRuleRepositories); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context);  }
@Test public void sensor_descriptor() { activeRules = new ActiveRulesBuilder().build(); DefaultSensorDescriptor descriptor = new DefaultSensorDescriptor(); sensor().describe(descriptor); assertThat(descriptor.name()).isEqualTo("Python Sensor"); assertThat(descriptor.languages()).containsOnly("py"); assertThat(descriptor.type()).isEqualTo(Type.MAIN); }