@Test public void should_create_sonarqube_way_profile() { ValidationMessages validation = ValidationMessages.create(); GherkinProfile definition = new GherkinProfile(universalRuleFinder()); RulesProfile profile = definition.createProfile(validation); assertThat(profile.getName()).isEqualTo("SonarQube Way"); assertThat(profile.getLanguage()).isEqualTo("gherkin"); assertThat(profile.getActiveRulesByRepository("gherkin")).hasSize(36); assertThat(validation.hasErrors()).isFalse(); }
@Override public RulesProfile createProfile(ValidationMessages messages) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( GherkinRulesDefinition.REPOSITORY_KEY, SONARQUBE_WAY_PROFILE_NAME, GherkinLanguage.KEY, GherkinRulesDefinition.getChecks(), messages); }
GherkinProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages messages) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( GherkinRulesDefinition.REPOSITORY_KEY, SONARQUBE_WAY_PROFILE_NAME, GherkinLanguage.KEY, GherkinRulesDefinition.getChecks(), messages); } }
GherkinProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages messages) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( GherkinRulesDefinition.REPOSITORY_KEY, SONARQUBE_WAY_PROFILE_NAME, GherkinLanguage.KEY, GherkinRulesDefinition.getChecks(), messages); } GherkinProfile(RuleFinder ruleFinder); }
GherkinProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages messages) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( GherkinRulesDefinition.REPOSITORY_KEY, SONARQUBE_WAY_PROFILE_NAME, GherkinLanguage.KEY, GherkinRulesDefinition.getChecks(), messages); } GherkinProfile(RuleFinder ruleFinder); @Override RulesProfile createProfile(ValidationMessages messages); }
GherkinProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages messages) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( GherkinRulesDefinition.REPOSITORY_KEY, SONARQUBE_WAY_PROFILE_NAME, GherkinLanguage.KEY, GherkinRulesDefinition.getChecks(), messages); } GherkinProfile(RuleFinder ruleFinder); @Override RulesProfile createProfile(ValidationMessages messages);  }