Search in sources :

Example 11 with CFLintFilter

use of com.cflint.tools.CFLintFilter in project CFLint by cflint.

the class TestCFBugsFilter method testIncludeCompound.

@Test
public void testIncludeCompound() throws IOException {
    BugInfo bugInfo = new BugInfo.BugInfoBuilder().setFunction("testf").setMessageCode("PARSE_ERROR").setSeverity(Levels.INFO).build();
    CFLintFilter filter = CFLintFilter.createFilter("[{\"severity\":\"INFO\",\"code\":\"OTH_ERROR\"}]");
    assertTrue(filter.include(bugInfo));
}
Also used : CFLintFilter(com.cflint.tools.CFLintFilter) Test(org.junit.Test)

Aggregations

CFLintFilter (com.cflint.tools.CFLintFilter)11 Test (org.junit.Test)8 CFLint (com.cflint.CFLint)2 HTMLOutput (com.cflint.HTMLOutput)2 TextOutput (com.cflint.TextOutput)2 XMLOutput (com.cflint.XMLOutput)2 DefaultCFlintResultMarshaller (com.cflint.xml.stax.DefaultCFlintResultMarshaller)2 File (java.io.File)2 FileInputStream (java.io.FileInputStream)2 FileWriter (java.io.FileWriter)2 IOException (java.io.IOException)2 OutputStreamWriter (java.io.OutputStreamWriter)2 Writer (java.io.Writer)2 TransformerException (javax.xml.transform.TransformerException)2 JSONOutput (com.cflint.JSONOutput)1 CFLintConfig (com.cflint.config.CFLintConfig)1 CFLintConfiguration (com.cflint.config.CFLintConfiguration)1 PluginMessage (com.cflint.config.CFLintPluginInfo.PluginInfoRule.PluginMessage)1 MarshallerException (com.cflint.xml.MarshallerException)1 FileNotFoundException (java.io.FileNotFoundException)1