@Test public void should_create_sonarqube_way_profile() { ValidationMessages validation = ValidationMessages.create(); ScssProfile definition = new ScssProfile(universalRuleFinder()); RulesProfile profile = definition.createProfile(validation); assertThat(profile.getName()).isEqualTo("SonarQube Way"); assertThat(profile.getLanguage()).isEqualTo("scss"); assertThat(profile.getActiveRulesByRepository("scss")).hasSize(84); assertThat(validation.hasErrors()).isFalse(); }
@Override public RulesProfile createProfile(ValidationMessages messages) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( CheckList.SCSS_REPOSITORY_KEY, SONARQUBE_WAY_PROFILE_NAME, ScssLanguage.KEY, CheckList.getScssChecks(), messages); }
ScssProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages messages) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( CheckList.SCSS_REPOSITORY_KEY, SONARQUBE_WAY_PROFILE_NAME, ScssLanguage.KEY, CheckList.getScssChecks(), messages); } }
ScssProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages messages) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( CheckList.SCSS_REPOSITORY_KEY, SONARQUBE_WAY_PROFILE_NAME, ScssLanguage.KEY, CheckList.getScssChecks(), messages); } ScssProfile(RuleFinder ruleFinder); }
ScssProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages messages) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( CheckList.SCSS_REPOSITORY_KEY, SONARQUBE_WAY_PROFILE_NAME, ScssLanguage.KEY, CheckList.getScssChecks(), messages); } ScssProfile(RuleFinder ruleFinder); @Override RulesProfile createProfile(ValidationMessages messages); }
ScssProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages messages) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( CheckList.SCSS_REPOSITORY_KEY, SONARQUBE_WAY_PROFILE_NAME, ScssLanguage.KEY, CheckList.getScssChecks(), messages); } ScssProfile(RuleFinder ruleFinder); @Override RulesProfile createProfile(ValidationMessages messages); static final String SONARQUBE_WAY_PROFILE_NAME; }