Package org.sonar.api.batch.sensor.internal

Examples of org.sonar.api.batch.sensor.internal.DefaultSensorDescriptor.provides()


      .workOnLanguages("java", "php")
      .workOnFileTypes(InputFile.Type.MAIN);

    assertThat(descriptor.name()).isEqualTo("Foo");
    assertThat(descriptor.dependsOn()).containsOnly(CoreMetrics.NCLOC);
    assertThat(descriptor.provides()).containsOnly(CoreMetrics.BLOCKER_VIOLATIONS);
    assertThat(descriptor.languages()).containsOnly("java", "php");
    assertThat(descriptor.types()).containsOnly(InputFile.Type.MAIN);
  }

}
View Full Code Here


    List<Object> result = new ArrayList<Object>();
    result.addAll(evaluateAnnotatedClasses(extension, DependedUpon.class));
    if (ClassUtils.isAssignable(extension.getClass(), Sensor.class)) {
      DefaultSensorDescriptor descriptor = new DefaultSensorDescriptor();
      ((Sensor) extension).describe(descriptor);
      result.addAll(Arrays.asList(descriptor.provides()));
    }
    return result;
  }

  private void completePhaseDependencies(DirectAcyclicGraph dag, Object extension) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.