Support --auto-gen-config for rules which start with "Abstract"
#142
+195
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This solves #124 slightly differently: As we know, which rules exist, we use that information and build up a map of rule java source files to rule references. E.g. in pmd-java/src/main/categories/java/bestpractices.xml we see, that the rule "AbstractClassWithoutAbstractMethod" is implemented in class "net.sourceforge.pmd.lang.java.rule.bestpractices.AbstractClassWithoutAbstractMethodRule". For this class name we can guess the corresponding java source (.../src/main/java/...). So, when we see this java source in the changes, then we know, we need to regression test that rule.
This means, we don't guess anymore, whether a java source file is a rule implementation - we have a list of all rule implementations that we can check now.
This also fixes the integration test (https://github.com/pmd/pmd-regression-tester/actions/workflows/manual-integration-tests.yml): In test case 1 we changed the rule AbstractClassWithoutAbstractMethod and we expect, that we only see differences from this rule. As other rules won't be executed, we expected that we get less errors - but with the change from #141 now all rules have been executed again.
Refs
--auto-gen-configinvalid rule references might be generated #124