Search in sources :

Example 21 with CFLintAPI

use of com.cflint.api.CFLintAPI in project CFLint by cflint.

the class TestFunctionLengthChecker method setUp.

@Before
public void setUp() throws CFLintConfigurationException {
    final ConfigBuilder configBuilder = new ConfigBuilder().include("EXCESSIVE_FUNCTION_LENGTH");
    cfBugs = new CFLintAPI(configBuilder.build());
}
Also used : CFLintAPI(com.cflint.api.CFLintAPI) ConfigBuilder(com.cflint.config.ConfigBuilder) Before(org.junit.Before)

Example 22 with CFLintAPI

use of com.cflint.api.CFLintAPI in project CFLint by cflint.

the class TestLiteralGlobalChecker method setUp.

@Before
public void setUp() throws Exception {
    final ConfigBuilder configBuilder = new ConfigBuilder().include("GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", "LOCAL_LITERAL_VALUE_USED_TOO_OFTEN");
    cfBugs = new CFLintAPI(configBuilder.build());
}
Also used : CFLintAPI(com.cflint.api.CFLintAPI) ConfigBuilder(com.cflint.config.ConfigBuilder) Before(org.junit.Before)

Example 23 with CFLintAPI

use of com.cflint.api.CFLintAPI in project CFLint by cflint.

the class TestLiteralLocalChecker method setUp.

@Before
public void setUp() throws Exception {
    final ConfigBuilder configBuilder = new ConfigBuilder().include("LOCAL_LITERAL_VALUE_USED_TOO_OFTEN");
    cfBugs = new CFLintAPI(configBuilder.build());
}
Also used : CFLintAPI(com.cflint.api.CFLintAPI) ConfigBuilder(com.cflint.config.ConfigBuilder) Before(org.junit.Before)

Example 24 with CFLintAPI

use of com.cflint.api.CFLintAPI in project CFLint by cflint.

the class TestParsingErrors method setUp.

@Before
public void setUp() throws Exception {
    final ConfigBuilder configBuilder = new ConfigBuilder().include("MISSING_VAR");
    cfBugs = new CFLintAPI(configBuilder.build());
}
Also used : CFLintAPI(com.cflint.api.CFLintAPI) ConfigBuilder(com.cflint.config.ConfigBuilder) Before(org.junit.Before)

Example 25 with CFLintAPI

use of com.cflint.api.CFLintAPI in project CFLint by cflint.

the class TestUnusedLocalVarChecker method setUp.

@Before
public void setUp() throws Exception {
    final ConfigBuilder configBuilder = new ConfigBuilder().include("UNUSED_LOCAL_VARIABLE");
    cfBugs = new CFLintAPI(configBuilder.build());
}
Also used : CFLintAPI(com.cflint.api.CFLintAPI) ConfigBuilder(com.cflint.config.ConfigBuilder) Before(org.junit.Before)

Aggregations

CFLintAPI (com.cflint.api.CFLintAPI)55 ConfigBuilder (com.cflint.config.ConfigBuilder)53 Before (org.junit.Before)53 CFLintConfig (com.cflint.config.CFLintConfig)3 CFLintPluginInfo (com.cflint.config.CFLintPluginInfo)3 PluginInfoRule (com.cflint.config.CFLintPluginInfo.PluginInfoRule)3 PluginMessage (com.cflint.config.CFLintPluginInfo.PluginInfoRule.PluginMessage)3 CFLintResult (com.cflint.api.CFLintResult)2 StringWriter (java.io.StringWriter)2 CFLintConfiguration (com.cflint.config.CFLintConfiguration)1 CFLintConfigurationException (com.cflint.exception.CFLintConfigurationException)1 CFLintScanException (com.cflint.exception.CFLintScanException)1 MarshallerException (com.cflint.xml.MarshallerException)1 File (java.io.File)1 FileWriter (java.io.FileWriter)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 OutputStreamWriter (java.io.OutputStreamWriter)1 PrintWriter (java.io.PrintWriter)1 Writer (java.io.Writer)1