use of com.cflint.api.CFLintResult in project CFLint by cflint.
the class TestCFBugs_Comments method testVarAndArgs_Disabled.
@Test
public void testVarAndArgs_Disabled() throws CFLintScanException {
final String cfcSrc = "<cfcomponent>\r\n" + "<cffunction name=\"test\">\r\n" + " " + "<!---CFLINT-DISABLE ARG_DEFAULT_MISSING --->" + "<cfargument name=\"xyz\">\r\n" + "</cffunction>\r\n" + "</cfcomponent>";
CFLintResult lintresult = cfBugs.scan(cfcSrc, "test");
final Map<String, List<BugInfo>> result = lintresult.getIssues();
assertEquals(0, result.size());
}
use of com.cflint.api.CFLintResult in project CFLint by cflint.
the class TestCFBugs_Comments method testNestedComments.
/* Entire function is commented */
@Test
public void testNestedComments() throws CFLintScanException {
final String cfcSrc = "<cfcomponent>\r\n" + "<!---<cffunction name=\"test\">\r\n" + " " + "<!---CFLINT-DISABLE SOMEOTHER--->" + "<cfargument name=\"xyz\">\r\n" + "</cffunction>\r\n" + "---></cfcomponent>";
CFLintResult lintresult = cfBugs.scan(cfcSrc, "test");
assertEquals(0, lintresult.getIssues().size());
}
use of com.cflint.api.CFLintResult in project CFLint by cflint.
the class TestCFBugs_ComponentHint method testHasHint.
@Test
public void testHasHint() throws CFLintScanException {
final String cfcSrc = "<cfcomponent hint=\"This is a test component.\">\r\n" + "<cffunction name=\"test\" >\r\n" + " <cfargument name=\"xyz\" default=\"123\">\r\n" + "</cffunction>\r\n" + "</cfcomponent>";
CFLintResult lintresult = cfBugs.scan(cfcSrc, "test");
final Map<String, List<BugInfo>> result = lintresult.getIssues();
assertEquals(0, result.size());
}
use of com.cflint.api.CFLintResult in project CFLint by cflint.
the class TestCFBugs_ComponentName method testDisplayNameScriptBased.
// TODO
public void testDisplayNameScriptBased() throws CFLintScanException {
final String cfcSrc = "component displayName=\"test\" {}";
CFLintResult lintresult = cfBugs.scan(cfcSrc, "test");
final List<BugInfo> result = lintresult.getIssues().values().iterator().next();
assertEquals(0, result.size());
}
use of com.cflint.api.CFLintResult in project CFLint by cflint.
the class TestCFBugs_ComponentName method testDisplayNameTagBased.
@Test
public void testDisplayNameTagBased() throws CFLintScanException {
final String cfcSrc = "<cfcomponent displayName=\"test\">\r\n</cfcomponent>";
CFLintResult lintresult = cfBugs.scan(cfcSrc, "test");
Collection<List<BugInfo>> result = lintresult.getIssues().values();
assertEquals(0, result.size());
}
Aggregations