Package org.sonar.commonrules.api

Examples of org.sonar.commonrules.api.CommonRulesRepository.rule()


  @Test
  public void enable_common_rules() {
    CxxCommonRulesEngine engine = new CxxCommonRulesEngine();
    CommonRulesRepository repo = engine.newRepository();
    assertThat(repo.rules()).hasSize(6);
    assertThat(repo.rule(CommonRulesRepository.RULE_INSUFFICIENT_COMMENT_DENSITY)).isNotNull();
  }
}
View Full Code Here


  @Test
  public void define_rules() {
    JavaScriptCommonRulesEngine engine = new JavaScriptCommonRulesEngine();
    CommonRulesRepository repo = engine.newRepository();
    assertThat(repo.rules()).hasSize(4);
    assertThat(repo.rule(CommonRulesRepository.RULE_INSUFFICIENT_COMMENT_DENSITY)).isNotNull();
    assertThat(repo.rule(CommonRulesRepository.RULE_DUPLICATED_BLOCKS)).isNotNull();
    assertThat(repo.rule(CommonRulesRepository.RULE_INSUFFICIENT_LINE_COVERAGE)).isNotNull();
    assertThat(repo.rule(CommonRulesRepository.RULE_INSUFFICIENT_BRANCH_COVERAGE)).isNotNull();
  }
View Full Code Here

  public void define_rules() {
    JavaScriptCommonRulesEngine engine = new JavaScriptCommonRulesEngine();
    CommonRulesRepository repo = engine.newRepository();
    assertThat(repo.rules()).hasSize(4);
    assertThat(repo.rule(CommonRulesRepository.RULE_INSUFFICIENT_COMMENT_DENSITY)).isNotNull();
    assertThat(repo.rule(CommonRulesRepository.RULE_DUPLICATED_BLOCKS)).isNotNull();
    assertThat(repo.rule(CommonRulesRepository.RULE_INSUFFICIENT_LINE_COVERAGE)).isNotNull();
    assertThat(repo.rule(CommonRulesRepository.RULE_INSUFFICIENT_BRANCH_COVERAGE)).isNotNull();
  }

}
View Full Code Here

    JavaScriptCommonRulesEngine engine = new JavaScriptCommonRulesEngine();
    CommonRulesRepository repo = engine.newRepository();
    assertThat(repo.rules()).hasSize(4);
    assertThat(repo.rule(CommonRulesRepository.RULE_INSUFFICIENT_COMMENT_DENSITY)).isNotNull();
    assertThat(repo.rule(CommonRulesRepository.RULE_DUPLICATED_BLOCKS)).isNotNull();
    assertThat(repo.rule(CommonRulesRepository.RULE_INSUFFICIENT_LINE_COVERAGE)).isNotNull();
    assertThat(repo.rule(CommonRulesRepository.RULE_INSUFFICIENT_BRANCH_COVERAGE)).isNotNull();
  }

}
View Full Code Here

    CommonRulesRepository repo = engine.newRepository();
    assertThat(repo.rules()).hasSize(4);
    assertThat(repo.rule(CommonRulesRepository.RULE_INSUFFICIENT_COMMENT_DENSITY)).isNotNull();
    assertThat(repo.rule(CommonRulesRepository.RULE_DUPLICATED_BLOCKS)).isNotNull();
    assertThat(repo.rule(CommonRulesRepository.RULE_INSUFFICIENT_LINE_COVERAGE)).isNotNull();
    assertThat(repo.rule(CommonRulesRepository.RULE_INSUFFICIENT_BRANCH_COVERAGE)).isNotNull();
  }

}
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.