use of cfml.parsing.cfscript.CFIdentifier in project CFLint by cflint.
the class ArgVarChecker method checkFullExpression.
private boolean checkFullExpression(final Context context, final CFFullVarExpression fullVarExpr) {
if (fullVarExpr.getExpressions().size() > 1 && fullVarExpr.getExpressions().get(0) instanceof CFIdentifier) {
final CFIdentifier cfIdentifier1 = (CFIdentifier) fullVarExpr.getExpressions().get(0);
if ("arguments".equalsIgnoreCase(cfIdentifier1.getName()) && fullVarExpr.getExpressions().get(1) instanceof CFIdentifier) {
final CFIdentifier cfIdentifier2 = (CFIdentifier) fullVarExpr.getExpressions().get(1);
final String name = cfIdentifier2.getName();
if (context.getCallStack().isVariable(name)) {
final String fileKey = context.fileFunctionString();
if (alreadyReportedFullExpression.contains(fileKey)) {
return true;
} else {
alreadyReportedFullExpression.add(fileKey);
}
context.addMessage("ARG_VAR_MIXED", name);
}
}
}
return false;
}
Aggregations