@Override public void define(Context context) { NewRepository repository = context.createRepository(REPOSITORY_KEY, Python.KEY).setName(REPOSITORY_NAME); xmlLoader.load(repository, getClass().getResourceAsStream(RULES_FILE), Charsets.UTF_8.name()); SqaleXmlLoader.load(repository, SQALE_FILE); repository.done(); }
@Override public void define(Context context) { NewRepository repository = context .createRepository(CheckList.REPOSITORY_KEY, CxxLanguage.KEY) .setName(REPOSITORY_NAME); AnnotationBasedRulesDefinition.load(repository, CxxLanguage.KEY, CheckList.getChecks()); for (NewRule rule : repository.rules()) { // FIXME: set internal key to key to ensure rule templates works properly : should be removed // when SONAR-6162 is fixed. rule.setInternalKey(rule.key()); } SqaleXmlLoader.load(repository, "/com/sonar/sqale/cxx-model.xml"); repository.done(); }