Skip to content

Commit

Permalink
[core] Take deprecated flag into account when loading rulesets/rules
Browse files Browse the repository at this point in the history
  • Loading branch information
adangel committed Aug 11, 2017
1 parent 2816988 commit ba32ed5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Expand Up @@ -567,6 +567,10 @@ private void parseSingleRuleNode(RuleSetReferenceId ruleSetReferenceId, RuleSetB
rule.setRuleSetName(ruleSetBuilder.getName());
rule.setExternalInfoUrl(ruleElement.getAttribute(EXTERNAL_INFO_URL));

if (hasAttributeSetTrue(ruleElement, "deprecated")) {
rule.setDeprecated(true);
}

if (hasAttributeSetTrue(ruleElement, "dfa")) {
rule.setUsesDFA();
}
Expand Down
Expand Up @@ -431,6 +431,7 @@ public void testInvertedMinimumMaximumLanugageVersions() throws RuleSetNotFoundE
public void testDirectDeprecatedRule() throws RuleSetNotFoundException {
Rule r = loadFirstRule(DIRECT_DEPRECATED_RULE);
assertNotNull("Direct Deprecated Rule", r);
assertTrue(r.isDeprecated());
}

@Test
Expand Down

0 comments on commit ba32ed5

Please sign in to comment.