Search in sources :

Example 1 with VarScoper

use of com.cflint.plugins.core.VarScoper in project CFLint by cflint.

the class TestCFBugs_ParseError method setUp.

@Before
public void setUp() throws Exception {
    final CFLintConfig conf = new CFLintConfig();
    cfBugs = new CFLint(conf, new VarScoper());
    cfBugs.setLogError(true);
}
Also used : CFLintConfig(com.cflint.config.CFLintConfig) VarScoper(com.cflint.plugins.core.VarScoper) Before(org.junit.Before)

Example 2 with VarScoper

use of com.cflint.plugins.core.VarScoper in project CFLint by cflint.

the class TestCFBugs_VarScoper_Names method setUp.

@Before
public void setUp() {
    CFLintConfig conf = new CFLintConfig();
    PluginInfoRule pluginRule = new PluginInfoRule();
    pluginRule.setName("VarScoper");
    conf.getRules().add(pluginRule);
    PluginMessage pluginMessage = new PluginMessage("MISSING_VAR");
    pluginMessage.setSeverity("ERROR");
    pluginMessage.setMessageText("Variable ${variable} is not declared with a var statement.");
    pluginRule.getMessages().add(pluginMessage);
    cfBugs = new CFLint(conf, new VarScoper());
}
Also used : CFLintConfig(com.cflint.config.CFLintConfig) PluginMessage(com.cflint.config.CFLintPluginInfo.PluginInfoRule.PluginMessage) VarScoper(com.cflint.plugins.core.VarScoper) PluginInfoRule(com.cflint.config.CFLintPluginInfo.PluginInfoRule) Before(org.junit.Before)

Example 3 with VarScoper

use of com.cflint.plugins.core.VarScoper in project CFLint by cflint.

the class TestParsingErrors method setUp.

@Before
public void setUp() throws Exception {
    CFLintConfig conf = new CFLintConfig();
    PluginInfoRule pluginRule = new PluginInfoRule();
    pluginRule.setName("VarScoper");
    conf.getRules().add(pluginRule);
    PluginMessage pluginMessage = new PluginMessage("MISSING_VAR");
    pluginMessage.setSeverity("ERROR");
    pluginMessage.setMessageText("Variable ${variable} is not declared with a var statement.");
    pluginRule.getMessages().add(pluginMessage);
    cfBugs = new CFLint(conf, new VarScoper());
}
Also used : CFLintConfig(com.cflint.config.CFLintConfig) PluginMessage(com.cflint.config.CFLintPluginInfo.PluginInfoRule.PluginMessage) VarScoper(com.cflint.plugins.core.VarScoper) PluginInfoRule(com.cflint.config.CFLintPluginInfo.PluginInfoRule) Before(org.junit.Before)

Example 4 with VarScoper

use of com.cflint.plugins.core.VarScoper in project CFLint by cflint.

the class TestCFBugs_VarScoper method setUp.

@Before
public void setUp() {
    CFLintConfig conf = new CFLintConfig();
    PluginInfoRule pluginRule = new PluginInfoRule();
    pluginRule.setName("VarScoper");
    conf.getRules().add(pluginRule);
    PluginMessage pluginMessage = new PluginMessage("MISSING_VAR");
    pluginMessage.setSeverity("ERROR");
    pluginMessage.setMessageText("Variable ${variable} is not declared with a var statement.");
    pluginRule.getMessages().add(pluginMessage);
    cfBugs = new CFLint(conf, new VarScoper());
}
Also used : CFLintConfig(com.cflint.config.CFLintConfig) PluginMessage(com.cflint.config.CFLintPluginInfo.PluginInfoRule.PluginMessage) VarScoper(com.cflint.plugins.core.VarScoper) PluginInfoRule(com.cflint.config.CFLintPluginInfo.PluginInfoRule) Before(org.junit.Before)

Example 5 with VarScoper

use of com.cflint.plugins.core.VarScoper in project CFLint by cflint.

the class TestCFBugs_VarScoper_TagAttr method setUp.

@Before
public void setUp() {
    CFLintConfig conf = new CFLintConfig();
    PluginInfoRule pluginRule = new PluginInfoRule();
    pluginRule.setName("VarScoper");
    conf.getRules().add(pluginRule);
    PluginMessage pluginMessage = new PluginMessage("MISSING_VAR");
    pluginMessage.setSeverity("ERROR");
    pluginMessage.setMessageText("Variable ${variable} is not declared with a var statement.");
    pluginRule.getMessages().add(pluginMessage);
    cfBugs = new CFLint(conf, new VarScoper());
}
Also used : CFLintConfig(com.cflint.config.CFLintConfig) PluginMessage(com.cflint.config.CFLintPluginInfo.PluginInfoRule.PluginMessage) VarScoper(com.cflint.plugins.core.VarScoper) PluginInfoRule(com.cflint.config.CFLintPluginInfo.PluginInfoRule) Before(org.junit.Before)

Aggregations

CFLintConfig (com.cflint.config.CFLintConfig)5 VarScoper (com.cflint.plugins.core.VarScoper)5 Before (org.junit.Before)5 PluginInfoRule (com.cflint.config.CFLintPluginInfo.PluginInfoRule)4 PluginMessage (com.cflint.config.CFLintPluginInfo.PluginInfoRule.PluginMessage)4