GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [core] Ruleset references that are relative to another ruleset cannot be resolved · Issue #6952 · pmd/pmd Closed DescriptionAffects PMD Version: 7.26 Description: PMD's RuleSetLoader can't resolve rule file references, if both these conditions are met:
Consequence: Rule file references that are relative to the rule file from which they're referenced from cannot be resolved. This causes the bug described in gradle/gradle#24885. Exception Stacktrace: From the testcase below: Code Sample demonstrating the issue: Add the following to net.sourceforge.pmd.lang.rule.RuleSetFactoryTest: @Test void testRefToSiblingRuleset(@TempDir Path tempDir) throws IOException { write(tempDir.resolve("leaf.xml"), rulesetXml(dummyRule())); write(tempDir.resolve("base.xml"), rulesetXml(rulesetRef("leaf.xml"))); write(tempDir.resolve("main.xml"), rulesetXml(rulesetRef("base.xml"))); RuleSet rs = new RuleSetLoader().loadFromResource(tempDir.resolve("main.xml").toString()); assertEquals(1, rs.size()); assertNotNull(rs.getRuleByName("MockRuleName")); } private static void write(Path file, String content) throws IOException { Files.write(file, content.getBytes(StandardCharsets.UTF_8)); } Steps to reproduce: Run the (failing) test pasted above. Alternatively, try the setup linked in the Gradle issue: https://github.com/lukelukes/gradle-pmd-bug Running PMD through: Gradle Activity
MetadataMetadataAssigneesLabelsa:bugPMD crashes or fails to analyse a file. TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |