@Test public void should_export_pmd_profile() { String importedXml = PmdTestUtils.getResourceContent("/org/sonar/plugins/pmd/export_simple.xml"); String exportedXml = exporter.exportProfile(PmdConstants.REPOSITORY_KEY, importProfile(importedXml)); assertThat(exportedXml).satisfies(equalsIgnoreEOL(importedXml)); }
@Override public void exportProfile(RulesProfile profile, Writer writer) { String profileName = profile.getName(); PmdRuleset tree = createPmdRuleset(PmdConstants.REPOSITORY_KEY, profile.getActiveRulesByRepository(PmdConstants.REPOSITORY_KEY), profileName); exportPmdRulesetToXml(tree, writer, profileName); }
PmdProfileExporter extends ProfileExporter { @Override public void exportProfile(RulesProfile profile, Writer writer) { String profileName = profile.getName(); PmdRuleset tree = createPmdRuleset(PmdConstants.REPOSITORY_KEY, profile.getActiveRulesByRepository(PmdConstants.REPOSITORY_KEY), profileName); exportPmdRulesetToXml(tree, writer, profileName); } }
PmdProfileExporter extends ProfileExporter { @Override public void exportProfile(RulesProfile profile, Writer writer) { String profileName = profile.getName(); PmdRuleset tree = createPmdRuleset(PmdConstants.REPOSITORY_KEY, profile.getActiveRulesByRepository(PmdConstants.REPOSITORY_KEY), profileName); exportPmdRulesetToXml(tree, writer, profileName); } PmdProfileExporter(); }
PmdProfileExporter extends ProfileExporter { @Override public void exportProfile(RulesProfile profile, Writer writer) { String profileName = profile.getName(); PmdRuleset tree = createPmdRuleset(PmdConstants.REPOSITORY_KEY, profile.getActiveRulesByRepository(PmdConstants.REPOSITORY_KEY), profileName); exportPmdRulesetToXml(tree, writer, profileName); } PmdProfileExporter(); @Override void exportProfile(RulesProfile profile, Writer writer); String exportProfile(String repositoryKey, RulesProfile profile); }
PmdProfileExporter extends ProfileExporter { @Override public void exportProfile(RulesProfile profile, Writer writer) { String profileName = profile.getName(); PmdRuleset tree = createPmdRuleset(PmdConstants.REPOSITORY_KEY, profile.getActiveRulesByRepository(PmdConstants.REPOSITORY_KEY), profileName); exportPmdRulesetToXml(tree, writer, profileName); } PmdProfileExporter(); @Override void exportProfile(RulesProfile profile, Writer writer); String exportProfile(String repositoryKey, RulesProfile profile);  }