use of com.cflint.api.CFLintAPI in project CFLint by cflint.
the class TestCFExecuteChecker method setUp.
@Before
public void setUp() throws Exception {
final ConfigBuilder configBuilder = new ConfigBuilder().include("AVOID_USING_CFEXECUTE_TAG");
cfBugs = new CFLintAPI(configBuilder.build());
}
use of com.cflint.api.CFLintAPI 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(Levels.ERROR);
pluginMessage.setMessageText("Tag <${variable}> should be written in lowercase or camelCase for consistency in code.");
pluginRule.getMessages().add(pluginMessage);
CFLintPluginInfo pluginInfo = new CFLintPluginInfo();
pluginInfo.getRules().add(pluginRule);
pluginRule.setClassName("CFTagCaseChecker");
pluginRule.addParameter("PreferCase", "lower");
cfBugs = new CFLintAPI(new ConfigBuilder(pluginInfo).include("CFTAG_PREFERRED_CASE").build());
cfBugs.setLogError(false);
}
use of com.cflint.api.CFLintAPI 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(Levels.ERROR);
pluginMessage.setMessageText("Tag <${variable}> should be written in lowercase or camelCase for consistency in code.");
pluginRule.getMessages().add(pluginMessage);
CFLintPluginInfo pluginInfo = new CFLintPluginInfo();
pluginInfo.getRules().add(pluginRule);
pluginRule.setClassName("CFTagCaseChecker");
pluginRule.addParameter("PreferCase", "upper");
cfBugs = new CFLintAPI(new ConfigBuilder(pluginInfo).include("CFTAG_PREFERRED_CASE").build());
cfBugs.setLogError(false);
}
use of com.cflint.api.CFLintAPI in project CFLint by cflint.
the class TestCFUpdateTagChecker method setUp.
@Before
public void setUp() throws Exception {
final ConfigBuilder configBuilder = new ConfigBuilder().include("AVOID_USING_CFUPDATE_TAG");
cfBugs = new CFLintAPI(configBuilder.build());
}
use of com.cflint.api.CFLintAPI in project CFLint by cflint.
the class TestCreateObjectChecker method setUp.
@Before
public void setUp() throws Exception {
final ConfigBuilder configBuilder = new ConfigBuilder().include("AVOID_USING_CREATEOBJECT");
cfBugs = new CFLintAPI(configBuilder.build());
}
Aggregations