@Test void should_export_pmd_profile_on_writer() { String importedXml = PmdTestUtils.getResourceContent("/org/sonar/plugins/pmd/export_simple.xml"); StringWriter stringWriter = new StringWriter(); exporter.exportProfile(importProfile(importedXml), stringWriter); assertThat(stringWriter.toString()).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)); 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)); 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)); 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)); 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)); exportPmdRulesetToXml(tree, writer, profileName); } PmdProfileExporter(); @Override void exportProfile(RulesProfile profile, Writer writer); String exportProfile(String repositoryKey, RulesProfile profile);  }