コード例 #1
0
 private static SonarScanner ditProjectSonarScanner() {
   return SonarScanner.create(TestUtils.projectDir("dit-check"))
       .setProperty("sonar.projectKey", PROJECT_KEY_DIT)
       .setProperty("sonar.projectName", "dit-check")
       .setProperty("sonar.projectVersion", "1.0-SNAPSHOT")
       .setProperty("sonar.profile", "dit-check")
       .setProperty("sonar.sources", "src/main/java");
 }
コード例 #2
0
 private static SonarScanner aarProjectSonarScanner() {
   return SonarScanner.create(TestUtils.projectDir("using-aar-dep"))
       .setProperty("sonar.projectKey", PROJECT_KEY_AAR)
       .setProperty("sonar.projectName", "using-aar-dep")
       .setProperty("sonar.projectVersion", "1.0-SNAPSHOT")
       .setProperty("sonar.profile", "using-aar-dep")
       .setProperty("sonar.sources", "src/main/java");
 }
コード例 #3
0
  @BeforeClass
  public static void setUp() {
    wsClient = newAdminWsClient(ORCHESTRATOR);

    ORCHESTRATOR.resetData();
    ORCHESTRATOR.executeBuild(
        SonarScanner.create(projectDir("shared/xoo-sample"))
            .setProperty("sonar.links.homepage", "http://example.com"));
  }
コード例 #4
0
  @BeforeClass
  public static void analyzeProject() {
    orchestrator.resetData();

    orchestrator
        .getServer()
        .restoreProfile(FileLocation.ofClasspath("/authorisation/one-issue-per-line-profile.xml"));

    orchestrator.getServer().provisionProject(PROJECT_KEY, "Sample");
    orchestrator
        .getServer()
        .associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
    SonarScanner sampleProject = SonarScanner.create(projectDir("shared/xoo-sample"));
    orchestrator.executeBuild(sampleProject);

    adminWsClient = newAdminWsClient(orchestrator);
    permissionsWsClient = adminWsClient.permissions();

    createUser(LOGIN, "George Orwell");
    createGroup(GROUP_NAME);
  }