'': function()

in rules/no-run-logic.js [39:71]


            'angular?run': function(callExpression, fn) {
                if (!fn) {
                    return;
                }
                fn.body.body.forEach(function(statement) {
                    if (statement.type !== 'ExpressionStatement') {
                        return report(statement);
                    }
                    var expression = statement.expression;

                    /**
                     * issue #466
                     */
                    if (expression.type === 'Literal' && expression.value.indexOf('use strict') >= 0) {
                        return;
                    }

                    if (expression.type !== 'CallExpression') {
                        return report(statement);
                    }
                    if (expression.callee.type === 'MemberExpression' && expression.callee.object.type !== 'Identifier') {
                        return report(statement);
                    }
                    if (!allowParams && expression.arguments.length) {
                        return context.report(expression, 'Run function call expressions may not take any arguments');
                    }
                    expression.arguments.forEach(function(argument) {
                        if (argument && argument.type !== 'Literal' && argument.type !== 'Identifier') {
                            context.report(argument, 'Run function call expressions may only take simple arguments');
                        }
                    });
                });
            }