本文整理汇总了Java中org.sonar.api.SonarRuntime类的典型用法代码示例。如果您正苦于以下问题:Java SonarRuntime类的具体用法?Java SonarRuntime怎么用?Java SonarRuntime使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SonarRuntime类属于org.sonar.api包,在下文中一共展示了SonarRuntime类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getMockContext
import org.sonar.api.SonarRuntime; //导入依赖的package包/类
private Context getMockContext() {
return new Context(new SonarRuntime() {
@Override
public Version getApiVersion() {
return null;
}
@Override
public SonarProduct getProduct() {
return null;
}
@Override
public SonarQubeSide getSonarQubeSide() {
return null;
}
});
}
开发者ID:Wikia,项目名称:sonar-php-rules,代码行数:19,代码来源:PluginTest.java
示例2: testExtensions
import org.sonar.api.SonarRuntime; //导入依赖的package包/类
@Test
@SuppressWarnings("rawtypes")
public void testExtensions() {
final SonarRuntime runtime = SonarRuntimeImpl.forSonarQube(Version.create(6, 7),
SonarQubeSide.SCANNER);
final Plugin.Context context = new Plugin.Context(runtime);
new XanitizerSonarQubePlugin().define(context);
final List extensions = context.getExtensions();
assertNotNull(extensions);
assertTrue(extensions.contains(XanitizerSensor.class));
assertTrue(extensions.contains(XanitizerMetrics.class));
assertTrue(extensions.contains(XanitizerRulesDefinition.class));
}
开发者ID:RIGS-IT,项目名称:sonar-xanitizer,代码行数:17,代码来源:PluginTest.java
示例3: DefaultSensorContext
import org.sonar.api.SonarRuntime; //导入依赖的package包/类
public DefaultSensorContext(InputModule module, Settings settings, FileSystem fs, ActiveRules activeRules,
SensorStorage sensorStorage, SonarRuntime sqRuntime) {
this.module = module;
this.settings = settings;
this.fs = fs;
this.activeRules = activeRules;
this.sensorStorage = sensorStorage;
this.sqRuntime = sqRuntime;
}
开发者ID:instalint-org,项目名称:instalint,代码行数:10,代码来源:DefaultSensorContext.java
示例4: test
import org.sonar.api.SonarRuntime; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Test
public void test() {
SonarRuntime runtime = SonarRuntimeImpl.forSonarQube(Version.create(5, 6), SonarQubeSide.SERVER);
Plugin.Context context = new Plugin.Context(runtime);
new PerlPlugin().define(context);
assertThat(context.getExtensions()).hasSize(7);
}
开发者ID:sonar-perl,项目名称:sonar-perl,代码行数:9,代码来源:PerlPluginTest.java
示例5: getExtensions
import org.sonar.api.SonarRuntime; //导入依赖的package包/类
@Test
public void getExtensions() {
SonarRuntime runtime = SonarRuntimeImpl.forSonarQube(Version.create(5, 6), SonarQubeSide.SCANNER);
Plugin.Context context = new Plugin.Context(runtime);
new GitPlugin().define(context);
assertThat(context.getExtensions()).hasSize(2);
}
开发者ID:SonarSource,项目名称:sonar-scm-git,代码行数:8,代码来源:GitPluginTest.java
示例6: getExtensions
import org.sonar.api.SonarRuntime; //导入依赖的package包/类
@Test
public void getExtensions() {
SonarRuntime runtime = SonarRuntimeImpl.forSonarQube(Version.create(5, 6), SonarQubeSide.SCANNER);
Plugin.Context context = new Plugin.Context(runtime);
new SvnPlugin().define(context);
assertThat(context.getExtensions()).hasSize(7);
}
开发者ID:SonarSource,项目名称:sonar-scm-svn,代码行数:8,代码来源:SvnPluginTest.java
示例7: runtime
import org.sonar.api.SonarRuntime; //导入依赖的package包/类
@Override
public SonarRuntime runtime() {
return sqRuntime;
}
开发者ID:instalint-org,项目名称:instalint,代码行数:5,代码来源:DefaultSensorContext.java
示例8: ExtensionInstaller
import org.sonar.api.SonarRuntime; //导入依赖的package包/类
public ExtensionInstaller(SonarRuntime sqRuntime, PluginRepository pluginRepository) {
this.sqRuntime = sqRuntime;
this.pluginRepository = pluginRepository;
}
开发者ID:instalint-org,项目名称:instalint,代码行数:5,代码来源:ExtensionInstaller.java
示例9: setupContext
import org.sonar.api.SonarRuntime; //导入依赖的package包/类
private Plugin.Context setupContext(SonarRuntime runtime) {
Plugin.Context context = new Plugin.Context(runtime);
new XmlPlugin().define(context);
return context;
}
开发者ID:SonarSource,项目名称:sonar-xml,代码行数:6,代码来源:XmlPluginTest.java
注:本文中的org.sonar.api.SonarRuntime类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论