@Test public void should_create_sonar_way_profile() { ValidationMessages validation = ValidationMessages.create(); RuleFinder ruleFinder = ruleFinder(); LuaProfile definition = new LuaProfile(ruleFinder); RulesProfile profile = definition.createProfile(validation); assertThat(profile.getLanguage()).isEqualTo(Lua.KEY); assertThat(profile.getName()).isEqualTo(CheckList.SONAR_WAY_PROFILE); assertThat(profile.getActiveRulesByRepository(CheckList.REPOSITORY_KEY)).hasSize(15); assertThat(validation.hasErrors()).isFalse(); }
@Override public RulesProfile createProfile(ValidationMessages validation) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( CheckList.REPOSITORY_KEY, CheckList.SONAR_WAY_PROFILE, Lua.KEY, CheckList.getChecks(), validation); }
LuaProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages validation) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( CheckList.REPOSITORY_KEY, CheckList.SONAR_WAY_PROFILE, Lua.KEY, CheckList.getChecks(), validation); } }
LuaProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages validation) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( CheckList.REPOSITORY_KEY, CheckList.SONAR_WAY_PROFILE, Lua.KEY, CheckList.getChecks(), validation); } LuaProfile(RuleFinder ruleFinder); }
LuaProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages validation) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( CheckList.REPOSITORY_KEY, CheckList.SONAR_WAY_PROFILE, Lua.KEY, CheckList.getChecks(), validation); } LuaProfile(RuleFinder ruleFinder); @Override RulesProfile createProfile(ValidationMessages validation); }
LuaProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages validation) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( CheckList.REPOSITORY_KEY, CheckList.SONAR_WAY_PROFILE, Lua.KEY, CheckList.getChecks(), validation); } LuaProfile(RuleFinder ruleFinder); @Override RulesProfile createProfile(ValidationMessages validation);  }