Package org.sonar.api.server.rule.RulesDefinition

Examples of org.sonar.api.server.rule.RulesDefinition.NewRule.param()


  public void override_annotation_programmatically() {
    RulesDefinition.Context context = new RulesDefinition.Context();
    RulesDefinition.NewRepository newRepository = context.createRepository("squid", "java");
    NewRule newRule = annotationLoader.loadRule(newRepository, RuleWithProperty.class);
    newRule.setName("Overriden name");
    newRule.param("property").setDefaultValue("true");
    newRule.param("property").setDescription("Overriden");
    newRepository.done();

    RulesDefinition.Repository repository = context.repository("squid");
    assertThat(repository.rules()).hasSize(1);
View Full Code Here


    RulesDefinition.Context context = new RulesDefinition.Context();
    RulesDefinition.NewRepository newRepository = context.createRepository("squid", "java");
    NewRule newRule = annotationLoader.loadRule(newRepository, RuleWithProperty.class);
    newRule.setName("Overriden name");
    newRule.param("property").setDefaultValue("true");
    newRule.param("property").setDescription("Overriden");
    newRepository.done();

    RulesDefinition.Repository repository = context.repository("squid");
    assertThat(repository.rules()).hasSize(1);
    RulesDefinition.Rule rule = repository.rules().get(0);
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.