forked from phoedos/pmd
[core] Fix rule loading - only override the flags, if they are true
Avoid disabling type resolution
This commit is contained in:
@ -197,9 +197,15 @@ import net.sourceforge.pmd.properties.PropertyDescriptor;
|
|||||||
rule.addExample(example);
|
rule.addExample(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isUsesDfa) {
|
||||||
rule.setDfa(isUsesDfa);
|
rule.setDfa(isUsesDfa);
|
||||||
|
}
|
||||||
|
if (isUsesMultifile) {
|
||||||
rule.setMultifile(isUsesMultifile);
|
rule.setMultifile(isUsesMultifile);
|
||||||
|
}
|
||||||
|
if (isUsesTyperesolution) {
|
||||||
rule.setTypeResolution(isUsesTyperesolution);
|
rule.setTypeResolution(isUsesTyperesolution);
|
||||||
|
}
|
||||||
|
|
||||||
for (PropertyDescriptor<?> descriptor : definedProperties) {
|
for (PropertyDescriptor<?> descriptor : definedProperties) {
|
||||||
if (!rule.getPropertyDescriptors().contains(descriptor)) {
|
if (!rule.getPropertyDescriptors().contains(descriptor)) {
|
||||||
|
Reference in New Issue
Block a user