Package org.sonar.api.batch.rule.internal

Examples of org.sonar.api.batch.rule.internal.NewActiveRule


  }

  private ActiveRules load(ProjectReferentials ref) {
    ActiveRulesBuilder builder = new ActiveRulesBuilder();
    for (ActiveRule activeRule : ref.activeRules()) {
      NewActiveRule newActiveRule = builder.create(RuleKey.of(activeRule.repositoryKey(), activeRule.ruleKey()));
      newActiveRule.setName(activeRule.name());
      newActiveRule.setSeverity(activeRule.severity());
      newActiveRule.setLanguage(activeRule.language());
      newActiveRule.setInternalKey(activeRule.internalKey());

      // load parameters
      for (Entry<String, String> param : activeRule.params().entrySet()) {
        newActiveRule.setParam(param.getKey(), param.getValue());
      }

      newActiveRule.activate();
    }
    return builder.build();
  }
View Full Code Here

TOP

Related Classes of org.sonar.api.batch.rule.internal.NewActiveRule

Copyright © 2018 www.massapicom. 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.