use of com.cflint.BugList in project CFLint by cflint.
the class PackageCaseChecker method expression.
@Override
public void expression(final CFExpression expression, final Context context, final BugList bugs) {
if (expression instanceof CFFunctionExpression) {
final CFFunctionExpression funcExpr = (CFFunctionExpression) expression;
if (isCreateObject(funcExpr)) {
final String componentPath = funcExpr.getArgs().get(1).Decompile(0).replace("'", "");
final String componentName = componentPath.replaceAll("^.+[.]", "");
checkComponentRegister(context, componentPath, componentName);
}
} else if (expression instanceof CFNewExpression) {
final CFNewExpression newExpr = (CFNewExpression) expression;
final String componentPath = newExpr.getComponentPath().Decompile(0);
final List<CFExpression> exprs = newExpr.getComponentPath().decomposeExpression();
final String componentName = exprs.isEmpty() ? "" : exprs.get(exprs.size() - 1).toString();
checkComponentRegister(context, componentPath, componentName);
}
}
Aggregations