PylintRulesDefinition implements RulesDefinition { @Override public void define(RulesDefinition.Context context) { RULE_LOADER.createExternalRuleRepository(context); }  @Override void define(RulesDefinition.Context context);  }
@Test public void pylint_external_repository() { RulesDefinition.Context context = new RulesDefinition.Context(); PylintRulesDefinition rulesDefinition = new PylintRulesDefinition(); rulesDefinition.define(context); assertThat(context.repositories()).hasSize(1); RulesDefinition.Repository repository = context.repository("external_pylint"); assertThat(repository).isNotNull(); assertThat(repository.name()).isEqualTo("Pylint"); assertThat(repository.language()).isEqualTo("py"); assertThat(repository.isExternal()).isTrue(); assertThat(repository.rules().size()).isEqualTo(370); RulesDefinition.Rule rule = repository.rule("C0121"); assertThat(rule).isNotNull(); assertThat(rule.name()).isEqualTo("Singleton comparison"); assertThat(rule.htmlDescription()).isEqualTo("See description of Pylint rule <code>C0121</code> at " + "the <a href=\"https: assertThat(rule.debtRemediationFunction().type().name()).isEqualTo("CONSTANT_ISSUE"); assertThat(rule.debtRemediationFunction().baseEffort()).isEqualTo("5min"); assertThat(rule.tags()).isEmpty(); }