Disable languages also from heuristics, fixes #673

This commit is contained in:
Adam Stankiewicz
2021-06-09 14:23:57 +02:00
parent e3ad29ce79
commit f05dea8dd7
3 changed files with 31 additions and 20 deletions

View File

@@ -427,18 +427,10 @@ def rule_to_code(rule)
end.join("\n")
end
if rule.has_key?("if_set")
if rule.has_key?("if")
return <<~EOS
if #{rule["negative"] ? "!" : ""}#{rule["if_set"]}
#{indent(rule_to_code(except(rule, "if_set", "negative")), 2)}
endif
EOS
end
if rule.has_key?("if_exists")
return <<~EOS
if #{rule["negative"] ? "!" : ""}exists("#{rule["if_exists"]}")
#{indent(rule_to_code(except(rule, "if_exists", "negative")), 2)}
if #{rule["if"]}
#{indent(rule_to_code(except(rule, "if")), 2)}
endif
EOS
end