org.sonar.api.server.profile.BuiltInQualityProfilesDefinition Java Examples

The following examples show how to use org.sonar.api.server.profile.BuiltInQualityProfilesDefinition. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KibitRulesTest.java    From sonar-clojure with MIT License 5 votes vote down vote up
@Test
public void testIfSonarwayProfileIsCreatedWithAllEastwoodRules() {
    BuiltInQualityProfilesDefinition.BuiltInQualityProfile profile = context.profile("clj", "Sonar way");
    List<BuiltInQualityProfilesDefinition.BuiltInActiveRule> rules = profile.rules();
    List<String> ruleKeys = new ArrayList<>();
    ruleKeys.addAll(asList("kibit"));

    ruleKeys.stream().forEach(kibitRule -> assertTrue(ruleKeys.contains(kibitRule)));
}
 
Example #2
Source File: ClojureSonarWayProfileTest.java    From sonar-clojure with MIT License 5 votes vote down vote up
@Before
public void setUp() {
    context = new BuiltInQualityProfilesDefinition.Context();
    clojureSonarWayProfile = new ClojureSonarWayProfile();
    clojureSonarWayProfile.define(context);
    BuiltInQualityProfilesDefinition.BuiltInQualityProfile profile = context.profile("clj", "Sonar way");
    List<BuiltInQualityProfilesDefinition.BuiltInActiveRule> rules = profile.rules();
    this.profileRules = rules.stream().map(r -> r.ruleKey()).collect(Collectors.toList());

}
 
Example #3
Source File: KibitRulesTest.java    From sonar-clojure with MIT License 4 votes vote down vote up
@Before
public void setUp() {
    context = new BuiltInQualityProfilesDefinition.Context();
    clojureSonarWayProfile = new ClojureSonarWayProfile();
    clojureSonarWayProfile.define(context);
}
 
Example #4
Source File: HtlProfileTest.java    From AEM-Rules-for-SonarQube with Apache License 2.0 4 votes vote down vote up
@Before
public void setUp() {
    profile = new HtlProfile();
    this.context = new BuiltInQualityProfilesDefinition.Context();

}