@Test public void profile() { BuiltInQualityProfilesDefinition.Context context = new BuiltInQualityProfilesDefinition.Context(); new RubyProfileDefinition().define(context); BuiltInQualityProfilesDefinition.BuiltInQualityProfile profile = context.profile("ruby", "Sonar way"); assertThat(profile.rules()).extracting("repoKey").containsOnly("ruby"); assertThat(profile.rules().size()).isGreaterThan(1); assertThat(profile.rules()).extracting(BuiltInActiveRule::ruleKey).contains("S1135"); }
@Override public void define(Context context) { NewBuiltInQualityProfile profile = context.createBuiltInQualityProfile(RubyPlugin.PROFILE_NAME, RubyPlugin.RUBY_LANGUAGE_KEY); BuiltInQualityProfileJsonLoader.load(profile, RubyPlugin.RUBY_REPOSITORY_KEY, PATH_TO_JSON); profile.done(); }
RubyProfileDefinition implements BuiltInQualityProfilesDefinition { @Override public void define(Context context) { NewBuiltInQualityProfile profile = context.createBuiltInQualityProfile(RubyPlugin.PROFILE_NAME, RubyPlugin.RUBY_LANGUAGE_KEY); BuiltInQualityProfileJsonLoader.load(profile, RubyPlugin.RUBY_REPOSITORY_KEY, PATH_TO_JSON); profile.done(); } }
RubyProfileDefinition implements BuiltInQualityProfilesDefinition { @Override public void define(Context context) { NewBuiltInQualityProfile profile = context.createBuiltInQualityProfile(RubyPlugin.PROFILE_NAME, RubyPlugin.RUBY_LANGUAGE_KEY); BuiltInQualityProfileJsonLoader.load(profile, RubyPlugin.RUBY_REPOSITORY_KEY, PATH_TO_JSON); profile.done(); }  }
RubyProfileDefinition implements BuiltInQualityProfilesDefinition { @Override public void define(Context context) { NewBuiltInQualityProfile profile = context.createBuiltInQualityProfile(RubyPlugin.PROFILE_NAME, RubyPlugin.RUBY_LANGUAGE_KEY); BuiltInQualityProfileJsonLoader.load(profile, RubyPlugin.RUBY_REPOSITORY_KEY, PATH_TO_JSON); profile.done(); }  @Override void define(Context context); }
RubyProfileDefinition implements BuiltInQualityProfilesDefinition { @Override public void define(Context context) { NewBuiltInQualityProfile profile = context.createBuiltInQualityProfile(RubyPlugin.PROFILE_NAME, RubyPlugin.RUBY_LANGUAGE_KEY); BuiltInQualityProfileJsonLoader.load(profile, RubyPlugin.RUBY_REPOSITORY_KEY, PATH_TO_JSON); profile.done(); }  @Override void define(Context context);  }