rImpl.setRuleViolationMessage("Consider using UNION ALL instead of OR in a WHERE clause.");
r.setRuleImplementation(rImpl);
rImpl.getCompliantRulesCodeExamples().getRuleCodeExample()
.add("SELECT name, surname, count from dbo.test where name = 'or' and surname = 'TestOR';");
rImpl.getViolatingRulesCodeExamples().getRuleCodeExample()
.add("SELECT name, surname, count from dbo.test where name = 'Test' OR surname = 'Testor';");
rImpl.setRuleViolationMessage("Consider using UNION ALL instead of OR in a WHERE clause."); r.setRuleImplementation(rImpl); rImpl.getCompliantRulesCodeExamples().getRuleCodeExample() .add("SELECT name, surname, count from dbo.test where name = 'or' and surname = 'TestOR';"); rImpl.getViolatingRulesCodeExamples().getRuleCodeExample() .add("SELECT name, surname, count from dbo.test where name = 'Test' OR surname = 'Testor';");