use of cfml.parsing.cfscript.CFExpression in project CFLint by cflint.
the class ComponentHintChecker method expression.
/**
* Parse a CF component deceleration to see if it's missing a hint.
*/
@Override
public void expression(final CFScriptStatement expression, final Context context, final BugList bugs) {
if (expression instanceof CFCompDeclStatement) {
final CFCompDeclStatement compDeclStatement = (CFCompDeclStatement) expression;
final CFExpression hintAttribute = CFTool.convertMap(compDeclStatement.getAttributes()).get("hint");
if (hintAttribute == null) {
checkHint(COMPONENT_HINT_MISSING, context.calcComponentName(), expression, context);
}
}
}
use of cfml.parsing.cfscript.CFExpression in project CFLint by cflint.
the class FunctionHintChecker method expression.
/**
* Parse a CF function deceleration to see if it's missing a hint.
*/
@Override
public void expression(final CFScriptStatement expression, final Context context, final BugList bugs) {
if (expression instanceof CFFuncDeclStatement) {
final CFFuncDeclStatement funcDeclStatement = (CFFuncDeclStatement) expression;
final CFExpression hintAttribute = CFTool.convertMap(funcDeclStatement.getAttributes()).get("hint");
if (hintAttribute == null) {
checkHint(FUNCTION_HINT_MISSING, context.getFunctionName(), expression, context);
}
}
}
Aggregations