当前位置: 首页>>代码示例>>Java>>正文


Java StandaloneGlobalConfiguration类代码示例

本文整理汇总了Java中org.sonarsource.sonarlint.core.client.api.standalone.StandaloneGlobalConfiguration的典型用法代码示例。如果您正苦于以下问题:Java StandaloneGlobalConfiguration类的具体用法?Java StandaloneGlobalConfiguration怎么用?Java StandaloneGlobalConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StandaloneGlobalConfiguration类属于org.sonarsource.sonarlint.core.client.api.standalone包,在下文中一共展示了StandaloneGlobalConfiguration类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: cleanUpOld

import org.sonarsource.sonarlint.core.client.api.standalone.StandaloneGlobalConfiguration; //导入依赖的package包/类
@Test
public void cleanUpOld() throws IOException {
  long creationTime = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(100);
  File workingDir = temp.newFolder();

  for (int i = 0; i < 3; i++) {
    File tmp = new File(workingDir, ".sonartmp_" + i);
    tmp.mkdirs();
    setFileCreationDate(tmp, creationTime);
  }

  tempFolderProvider.provide(StandaloneGlobalConfiguration.builder().setWorkDir(workingDir.toPath()).build());
  // this also checks that all other temps were deleted
  assertThat(getCreatedTempDir(workingDir)).exists();

  FileUtils.deleteQuietly(workingDir);
}
 
开发者ID:instalint-org,项目名称:instalint,代码行数:18,代码来源:GlobalTempFolderProviderTest.java

示例2: createStandalone

import org.sonarsource.sonarlint.core.client.api.standalone.StandaloneGlobalConfiguration; //导入依赖的package包/类
private static SonarLint createStandalone(boolean verbose) {
  LOGGER.info("Standalone mode");
  URL[] plugins;

  try {
    plugins = loadPlugins();
  } catch (Exception e) {
    throw new IllegalStateException("Error loading plugins", e);
  }

  StandaloneGlobalConfiguration config = StandaloneGlobalConfiguration.builder()
    .addPlugins(plugins)
    .setLogOutput(new DefaultLogOutput(LOGGER, verbose))
    .build();

  StandaloneSonarLintEngine engine = new StandaloneSonarLintEngineImpl(config);
  return new StandaloneSonarLint(engine);
}
 
开发者ID:SonarSource,项目名称:sonarlint-cli,代码行数:19,代码来源:SonarLintFactory.java

示例3: createTempFolderProps

import org.sonarsource.sonarlint.core.client.api.standalone.StandaloneGlobalConfiguration; //导入依赖的package包/类
@Test
public void createTempFolderProps() throws Exception {
  File workingDir = temp.newFolder();

  TempFolder tempFolder = tempFolderProvider.provide(StandaloneGlobalConfiguration.builder().setWorkDir(workingDir.toPath()).build());
  tempFolder.newDir();
  tempFolder.newFile();
  assertThat(getCreatedTempDir(workingDir)).exists();
  assertThat(getCreatedTempDir(workingDir).list()).hasSize(2);

  FileUtils.deleteQuietly(workingDir);
}
 
开发者ID:instalint-org,项目名称:instalint,代码行数:13,代码来源:GlobalTempFolderProviderTest.java

示例4: createTempFolderSonarHome

import org.sonarsource.sonarlint.core.client.api.standalone.StandaloneGlobalConfiguration; //导入依赖的package包/类
@Test
public void createTempFolderSonarHome() throws Exception {
  // with sonar home, it will be in {sonar.home}/.sonartmp
  File sonarHome = temp.newFolder();
  File workingDir = new File(sonarHome, StandaloneGlobalConfiguration.DEFAULT_WORK_DIR).getAbsoluteFile();

  TempFolder tempFolder = tempFolderProvider.provide(StandaloneGlobalConfiguration.builder().setSonarLintUserHome(sonarHome.toPath()).build());
  tempFolder.newDir();
  tempFolder.newFile();
  assertThat(getCreatedTempDir(workingDir)).exists();
  assertThat(getCreatedTempDir(workingDir).list()).hasSize(2);

  FileUtils.deleteQuietly(sonarHome);
}
 
开发者ID:instalint-org,项目名称:instalint,代码行数:15,代码来源:GlobalTempFolderProviderTest.java

示例5: prepare

import org.sonarsource.sonarlint.core.client.api.standalone.StandaloneGlobalConfiguration; //导入依赖的package包/类
@BeforeClass
public static void prepare() throws Exception {
  StandaloneGlobalConfiguration sonarLintConfig = StandaloneGlobalConfiguration.builder()
    .addPlugin(FileLocation.byWildcardMavenFilename(new File("../../sonar-web-plugin/target"), "sonar-web-plugin-*.jar").getFile().toURI().toURL())
    .setSonarLintUserHome(temp.newFolder().toPath())
    .setLogOutput((formattedMessage, level) -> {
      /* Don't pollute logs */ })
    .build();
  sonarlintEngine = new StandaloneSonarLintEngineImpl(sonarLintConfig);
  baseDir = temp.newFolder();
}
 
开发者ID:SonarSource,项目名称:sonar-web,代码行数:12,代码来源:SonarLintTest.java

示例6: create

import org.sonarsource.sonarlint.core.client.api.standalone.StandaloneGlobalConfiguration; //导入依赖的package包/类
public static StandaloneGlobalContainer create(StandaloneGlobalConfiguration globalConfig) {
  StandaloneGlobalContainer container = new StandaloneGlobalContainer();
  container.add(globalConfig);
  container.add(new StandalonePluginUrls(globalConfig.getPluginUrls()));
  return container;
}
 
开发者ID:instalint-org,项目名称:instalint,代码行数:7,代码来源:StandaloneGlobalContainer.java

示例7: StandaloneSonarLintEngineImpl

import org.sonarsource.sonarlint.core.client.api.standalone.StandaloneGlobalConfiguration; //导入依赖的package包/类
public StandaloneSonarLintEngineImpl(StandaloneGlobalConfiguration globalConfig) {
  this.globalConfig = globalConfig;
  this.logOutput = globalConfig.getLogOutput();
  start();
}
 
开发者ID:instalint-org,项目名称:instalint,代码行数:6,代码来源:StandaloneSonarLintEngineImpl.java

示例8: setUp

import org.sonarsource.sonarlint.core.client.api.standalone.StandaloneGlobalConfiguration; //导入依赖的package包/类
@Before
public void setUp() throws IOException {
  userHome = temp.newFolder();
  PluginCache fileCache = new PluginCacheProvider().provide(StandaloneGlobalConfiguration.builder().setSonarLintUserHome(userHome.toPath()).build());
  underTest = new DefaultPluginJarExploder(fileCache);
}
 
开发者ID:instalint-org,项目名称:instalint,代码行数:7,代码来源:DefaultPluginJarExploderTest.java

示例9: setUp

import org.sonarsource.sonarlint.core.client.api.standalone.StandaloneGlobalConfiguration; //导入依赖的package包/类
@Before
public void setUp() throws IOException {
  engine = new StandaloneSonarLintEngineImpl(StandaloneGlobalConfiguration.builder().build());
  sonarLint = new StandaloneSonarLint(engine);
}
 
开发者ID:SonarSource,项目名称:sonarlint-cli,代码行数:6,代码来源:StandaloneSonarLintTest.java


注:本文中的org.sonarsource.sonarlint.core.client.api.standalone.StandaloneGlobalConfiguration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。