Java Code Examples for org.sonar.api.batch.sensor.SensorDescriptor#onlyOnLanguage()

The following examples show how to use org.sonar.api.batch.sensor.SensorDescriptor#onlyOnLanguage() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FlowSquidSensor.java    From sonar-flow-plugin with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void describe(SensorDescriptor descriptor) {
  descriptor.name("Scans flow files");
  descriptor.onlyOnLanguage("flow");
  descriptor.createIssuesForRuleRepositories(FlowRulesDefinition.REPO_KEY);

}
 
Example 2
Source File: AnsibleExtraSensor.java    From sonar-ansible with Apache License 2.0 4 votes vote down vote up
@Override
public void describe(SensorDescriptor descriptor) {
    descriptor.onlyOnLanguage(YamlLanguage.KEY);
    descriptor.name("Ansible-Lint Sensor with Extra Rules");
}
 
Example 3
Source File: AnsibleSensor.java    From sonar-ansible with Apache License 2.0 4 votes vote down vote up
@Override
public void describe(SensorDescriptor descriptor) {
    descriptor.onlyOnLanguage(YamlLanguage.KEY);
    descriptor.name("Ansible Lint Sensor");
}
 
Example 4
Source File: CombinedCoverageSensor.java    From sonar-ruby-plugin with MIT License 4 votes vote down vote up
@Override
public void describe(SensorDescriptor descriptor) {
    descriptor.name("Combined SimpleCov and LOC sensor");
    descriptor.onlyOnLanguage(Ruby.LANGUAGE_KEY);
}
 
Example 5
Source File: ColdFusionSensor.java    From sonar-coldfusion with Apache License 2.0 4 votes vote down vote up
@Override
public void describe(SensorDescriptor descriptor) {
    descriptor.onlyOnLanguage(ColdFusionPlugin.LANGUAGE_KEY);
    descriptor.createIssuesForRuleRepository(ColdFusionPlugin.REPOSITORY_KEY);
}
 
Example 6
Source File: SmellMeasuresSensor.java    From qualinsight-plugins-sonarqube-smell with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public void describe(final SensorDescriptor descriptor) {
    descriptor.name(this.getClass()
        .getSimpleName());
    descriptor.onlyOnLanguage(Java.KEY);
}
 
Example 7
Source File: CombinedCoverageSensor.java    From SonarTsPlugin with MIT License 4 votes vote down vote up
@Override
public void describe(SensorDescriptor descriptor) {
    descriptor.name("Combined LCOV and LOC sensor");
    descriptor.onlyOnLanguage(TypeScriptLanguage.LANGUAGE_KEY);
}