use of com.cflint.plugins.core.CFTagCaseChecker in project CFLint by cflint.
the class TestCFTagLowercaseChecker method setUp.
@Before
public void setUp() throws Exception {
final CFLintConfig conf = new CFLintConfig();
PluginInfoRule pluginRule = new PluginInfoRule();
pluginRule.setName("CFTagCaseChecker");
conf.getRules().add(pluginRule);
PluginMessage pluginMessage = new PluginMessage("CFTAG_PREFERRED_CASE");
pluginMessage.setSeverity("ERROR");
pluginMessage.setMessageText("Tag <${variable}> should be written in lowercase or camelCase for consistency in code.");
pluginRule.getMessages().add(pluginMessage);
CFTagCaseChecker caseChecker = new CFTagCaseChecker();
caseChecker.setParameter("PreferCase", "lower");
cfBugs = new CFLint(conf, caseChecker);
cfBugs.setLogError(false);
}
use of com.cflint.plugins.core.CFTagCaseChecker in project CFLint by cflint.
the class TestCFTagUppercaseChecker method setUp.
@Before
public void setUp() throws Exception {
final CFLintConfig conf = new CFLintConfig();
PluginInfoRule pluginRule = new PluginInfoRule();
pluginRule.setName("CFTagCaseChecker");
conf.getRules().add(pluginRule);
PluginMessage pluginMessage = new PluginMessage("CFTAG_PREFERRED_CASE");
pluginMessage.setSeverity("ERROR");
pluginMessage.setMessageText("Tag <${variable}> should be written in lowercase or camelCase for consistency in code.");
pluginRule.getMessages().add(pluginMessage);
CFTagCaseChecker caseChecker = new CFTagCaseChecker();
caseChecker.setParameter("PreferCase", "upper");
cfBugs = new CFLint(conf, caseChecker);
cfBugs.setLogError(false);
}
Aggregations