@Test public void rubocop_lint_external_repository() { RulesDefinition.Context context = new RulesDefinition.Context(); RuboCopRulesDefinition rulesDefinition = new RuboCopRulesDefinition(true); rulesDefinition.define(context); assertThat(context.repositories()).hasSize(1); RulesDefinition.Repository repository = context.repository("external_rubocop"); assertThat(repository.name()).isEqualTo("RuboCop"); assertThat(repository.language()).isEqualTo("ruby"); assertThat(repository.isExternal()).isEqualTo(true); assertThat(repository.rules().size()).isEqualTo(425); RulesDefinition.Rule rule = repository.rule("Lint/MultipleCompare"); assertThat(rule).isNotNull(); assertThat(rule.name()).isEqualTo("Multiple Compare (Lint)"); assertThat(rule.type()).isEqualTo(RuleType.CODE_SMELL); assertThat(rule.severity()).isEqualTo("MAJOR"); assertThat(rule.htmlDescription()).isEqualTo("<p>Use `&amp;&amp;` operator to compare multiple value.</p> " + "<p>See more at the <a href=\"https: assertThat(rule.tags()).isEmpty(); assertThat(rule.debtRemediationFunction().baseEffort()).isEqualTo("5min"); }
@Override public void define(Context context) { if (externalIssuesSupported) { RULE_LOADER.createExternalRuleRepository(context); } }
RuboCopRulesDefinition implements RulesDefinition { @Override public void define(Context context) { if (externalIssuesSupported) { RULE_LOADER.createExternalRuleRepository(context); } } }
RuboCopRulesDefinition implements RulesDefinition { @Override public void define(Context context) { if (externalIssuesSupported) { RULE_LOADER.createExternalRuleRepository(context); } } RuboCopRulesDefinition(boolean externalIssuesSupported); }
RuboCopRulesDefinition implements RulesDefinition { @Override public void define(Context context) { if (externalIssuesSupported) { RULE_LOADER.createExternalRuleRepository(context); } } RuboCopRulesDefinition(boolean externalIssuesSupported); @Override void define(Context context); }
RuboCopRulesDefinition implements RulesDefinition { @Override public void define(Context context) { if (externalIssuesSupported) { RULE_LOADER.createExternalRuleRepository(context); } } RuboCopRulesDefinition(boolean externalIssuesSupported); @Override void define(Context context);  }