Search in sources :

Example 21 with RulesProfile

use of org.sonar.api.profiles.RulesProfile in project sonar-web by SonarSource.

the class SonarWayProfile method createProfile.

@Override
public RulesProfile createProfile(ValidationMessages messages) {
    RulesProfile profile = RulesProfile.create(NAME, WebConstants.LANGUAGE_KEY);
    ProfileDefinitionReader definitionReader = new ProfileDefinitionReader(ruleFinder);
    definitionReader.activateRules(profile, WebRulesDefinition.REPOSITORY_KEY, "org/sonar/l10n/web/rules/Web/Sonar_way_profile.json");
    return profile;
}
Also used : ProfileDefinitionReader(org.sonarsource.analyzer.commons.ProfileDefinitionReader) RulesProfile(org.sonar.api.profiles.RulesProfile)

Aggregations

RulesProfile (org.sonar.api.profiles.RulesProfile)21 Test (org.junit.Test)6 ValidationMessages (org.sonar.api.utils.ValidationMessages)5 QualityProfileDto (org.sonar.db.qualityprofile.QualityProfileDto)4 ActiveRulesBuilder (org.sonar.api.batch.rule.internal.ActiveRulesBuilder)3 DbSession (org.sonar.db.DbSession)3 ActiveRuleDto (org.sonar.db.qualityprofile.ActiveRuleDto)3 ActiveRuleParamDto (org.sonar.db.qualityprofile.ActiveRuleParamDto)3 ArrayList (java.util.ArrayList)2 Map (java.util.Map)2 ProfileDefinition (org.sonar.api.profiles.ProfileDefinition)2 ProfileImporter (org.sonar.api.profiles.ProfileImporter)2 RuleKey (org.sonar.api.rule.RuleKey)2 ActiveRule (org.sonar.api.rules.ActiveRule)2 ActiveRuleParam (org.sonar.api.rules.ActiveRuleParam)2 Rule (org.sonar.api.rules.Rule)2 RulesDefinition (org.sonar.api.server.rule.RulesDefinition)2 ActiveRuleDao (org.sonar.db.qualityprofile.ActiveRuleDao)2 ActiveRuleKey (org.sonar.db.qualityprofile.ActiveRuleKey)2 QualityProfileDao (org.sonar.db.qualityprofile.QualityProfileDao)2