use of com.cflint.plugins.core.ArgDefChecker in project CFLint by cflint.
the class TestCFLint2Files method setUp.
@Before
public void setUp() throws Exception {
final CFLintConfig conf = new CFLintConfig();
PluginInfoRule pluginRule = new PluginInfoRule();
pluginRule.setName("ArgDefChecker");
conf.getRules().add(pluginRule);
PluginMessage pluginMessage = new PluginMessage("ARG_DEFAULT_MISSING");
pluginMessage.setSeverity("WARNING");
pluginMessage.setMessageText("Argument ${variable} is not required and does not define a default value.");
pluginRule.getMessages().add(pluginMessage);
pluginRule = new PluginInfoRule();
pluginRule.setName("QueryParamChecker");
conf.getRules().add(pluginRule);
pluginMessage = new PluginMessage("QUERYPARAM_REQ");
pluginMessage.setSeverity("WARNING");
pluginMessage.setMessageText("setSql() statement should use .addParam() instead of #'s for security.");
pluginRule.getMessages().add(pluginMessage);
cfBugs = new CFLint(conf, new ArgDefChecker(), new QueryParamChecker());
}
use of com.cflint.plugins.core.ArgDefChecker in project CFLint by cflint.
the class TestCFBugs_Comments method setUp.
@Before
public void setUp() throws Exception {
final CFLintConfig conf = new CFLintConfig();
final PluginInfoRule pluginRule = new PluginInfoRule();
pluginRule.setName("ArgDefChecker");
conf.getRules().add(pluginRule);
final PluginMessage pluginMessage = new PluginMessage("ARG_DEFAULT_MISSING");
pluginMessage.setSeverity("WARNING");
pluginMessage.setMessageText("Argument ${variable} is not required and does not define a default value.");
pluginRule.getMessages().add(pluginMessage);
cfBugs = new CFLint(conf, new ArgDefChecker());
}
Aggregations