Checks the arguments of a given CallExpression node and reports it if it
offends this rule.

@param {ASTNode} node - A CallExpression node to check.
@returns {void}
766075
function checkArguments(node) {
            const args = node.arguments;

            switch (args.length) {
                case 0:
                    context.report({
                        node,
                        message: "Missing parameters."
                    });
                    break;

                case 1:
                    if (mode === MODE_ALWAYS) {
                        context.report({
                            node,
                            message: "Missing radix parameter."
                        });
                    }
                    break;

                default:
                    if (mode === MODE_AS_NEEDED && isDefaultRadix(args[1])) {
                        context.report({
                            node,
                            message: "Redundant radix parameter."
                        });
                    } else if (!isValidRadix(args[1])) {
                        context.report({
                            node,
                            message: "Invalid radix parameter."
                        });
                    }
                    break;
            }
        }
563247
function ignoreSubAst(node) {
        return node.type === 'CallExpression' && node.callee.type === 'MemberExpression' &&
            node.callee.object.type === 'Identifier' && node.callee.object.name === JALANGI_VAR &&
            node.callee.property.type === 'Identifier' && node.callee.property.name === 'I';
    }
717960
function checkCallExpression(node) {
            // Grammar checking; stop grammar-checking if checkGrammarTypeArguments return true
            checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments);
            var signature = getResolvedSignature(node);
            if (node.expression.kind === 95 /* SuperKeyword */) {
                return voidType;
            }
            if (node.kind === 175 /* NewExpression */) {
                var declaration = signature.declaration;
                if (declaration &&
                    declaration.kind !== 148 /* Constructor */ &&
                    declaration.kind !== 152 /* ConstructSignature */ &&
                    declaration.kind !== 157 /* ConstructorType */ &&
                    !ts.isJSDocConstructSignature(declaration)) {
                    // When resolved signature is a call signature (and not a construct signature) the result type is any, unless
                    // the declaring function had members created through 'x.prototype.y = expr' or 'this.y = expr' psuedodeclarations
                    // in a JS file
                    // Note:JS inferred classes might come from a variable declaration instead of a function declaration.
                    // In this case, using getResolvedSymbol directly is required to avoid losing the members from the declaration.
                    var funcSymbol = node.expression.kind === 69 /* Identifier */ ?
                        getResolvedSymbol(node.expression) :
                        checkExpression(node.expression).symbol;
                    if (funcSymbol && funcSymbol.members && (funcSymbol.flags & 16 /* Function */ || ts.isDeclarationOfFunctionExpression(funcSymbol))) {
                        return getInferredClassType(funcSymbol);
                    }
                    else if (compilerOptions.noImplicitAny) {
                        error(node, ts.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type);
                    }
                    return anyType;
                }
            }
            // In JavaScript files, calls to any identifier 'require' are treated as external module imports
            if (ts.isInJavaScriptFile(node) && ts.isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) {
                return resolveExternalModuleTypeByLiteral(node.arguments[0]);
            }
            return getReturnTypeOfSignature(signature);
        }
382950
function verify(node) {
	switch (node.type) {
		case esprima.Syntax.FunctionDeclaration:
			if (node.leadingComments && node.leadingComments.length === 1) {
				analyzeFunction(node);
			}
			break;
		default:
			break;
	}
}
123500
function checkImportCall(node) {
    if (node.callee.type !== 'Import') return
    if (node.arguments.length !== 1) return

    const modulePath = node.arguments[0]
    if (modulePath.type !== 'Literal') return
    if (typeof modulePath.value !== 'string') return

    checkSourceValue(modulePath, node)
  }
425011
function (node) {
        if (funcInfo.shouldCheck) {
          funcInfo.hasReturn = true

          if (!node.argument) {
            context.report({
              node: node,
              message: 'Expected a return value'
            })
          }
        }
      }
517166
function (node) {
                if (node.value && node.value.type === "FunctionExpression") {
                    if (node.key && node.key.type === "Identifier") {
                        _addResult(node.key);
                    }
                }
            }
273159
function checkArgumentAlignment(context, node) {

  function isNodeFirstInLine(node, byEndLocation) {
    const firstToken = byEndLocation === true ? context.getLastToken(node, 1) :
      context.getTokenBefore(node);
    const startLine = byEndLocation === true ? node.loc.end.line :
      node.loc.start.line;
    const endLine = firstToken ? firstToken.loc.end.line : -1;

    return startLine !== endLine;
  }

  if (node.arguments.length === 0)
    return;

  var msg = '';
  const first = node.arguments[0];
  var currentLine = first.loc.start.line;
  const firstColumn = first.loc.start.column;

  const ignoreTypes = [
    'ArrowFunctionExpression',
    'FunctionExpression',
    'ObjectExpression',
  ];

  const args = node.arguments;

  // For now, don't bother trying to validate potentially complicating things
  // like closures. Different people will have very different ideas and it's
  // probably best to implement configuration options.
  if (args.some((node) => { return ignoreTypes.indexOf(node.type) !== -1; })) {
    return;
  }

  if (!isNodeFirstInLine(node)) {
    return;
  }

  var misaligned;

  args.slice(1).forEach((argument) => {
    if (!misaligned) {
      if (argument.loc.start.line === currentLine + 1) {
        if (argument.loc.start.column !== firstColumn) {
          if (isNodeFirstInLine(argument)) {
            msg = 'Function argument in column ' +
                  `${argument.loc.start.column + 1}, ` +
                  `expected in ${firstColumn + 1}`;
            misaligned = argument;
          }
        }
      }
    }
    currentLine = argument.loc.start.line;
  });

  if (msg)
    context.report(misaligned, msg);
}
820733
function checkFunction(node) {
            const scope = context.getScope();
            const regExpVar = astUtils.getVariableByName(scope, "RegExp");
            const shadowed = regExpVar && regExpVar.defs.length > 0;

            if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0]) && !shadowed) {
                checkRegex(node, node.arguments[0].value, node.arguments[0].range[0] + 1);
            }
        }
239472
function (node) {
      if (!node.parent) {
        return false;
      }
      return /^(React\.)?createClass$/.test(sourceCode.getText(node.parent.callee));
    }
897775
function isHeadOfExpressionStatement(node) {
			var parent = node.parent;

			while (parent) {
				switch (parent.type) {
					case "SequenceExpression":
						if (parent.expressions[0] !== node || isParenthesised(node)) {
							return false;
						}
						break;

					case "UnaryExpression":
					case "UpdateExpression":
						if (parent.prefix || isParenthesised(node)) {
							return false;
						}
						break;

					case "BinaryExpression":
					case "LogicalExpression":
						if (parent.left !== node || isParenthesised(node)) {
							return false;
						}
						break;

					case "ConditionalExpression":
						if (parent.test !== node || isParenthesised(node)) {
							return false;
						}
						break;

					case "CallExpression":
						if (parent.callee !== node || isParenthesised(node)) {
							return false;
						}
						break;

					case "MemberExpression":
						if (parent.object !== node || isParenthesised(node)) {
							return false;
						}
						break;

					case "ExpressionStatement":
						return true;

					default:
						return false;
				}

				node = parent;
				parent = parent.parent;
			}

			/* istanbul ignore next */
			throw new Error("unreachable");
		}
985327
function isMethodWhichHasThisArg(node) {
    for (
        let currentNode = node;
        currentNode.type === "MemberExpression" && !currentNode.computed;
        currentNode = currentNode.property
    ) {
        if (currentNode.property.type === "Identifier") {
            return arrayMethodPattern.test(currentNode.property.name);
        }
    }

    return false;
}
1219753
function(nodes, methods) {
        var segmentsToBlank = [];

        for (var i = 0, ii = nodes.length; i < ii; ++i) {
            // checks if the statement is a CallExpression
            if (nodes[i].type === 'CallExpression' &&
                    nodes[i].callee.type === 'MemberExpression') {
                var nodeExpression = nodes[i];
                // checks if the called function is a property of console or window.console
                if (nodeExpression.callee.object.name === 'console' || (
                        nodeExpression.callee.object.property !== undefined &&
                        nodeExpression.callee.object.object !== undefined &&
                        nodeExpression.callee.object.property.name === 'console' &&
                        nodeExpression.callee.object.object.name === 'window'
                )) {
                    // push the node if the current function is within the methods array
                    if (methods.indexOf(nodeExpression.callee.property.name) > -1) {
                        segmentsToBlank.push(nodeExpression.range);
                    }
                }
            }
        }
        // sort the range segments list
        segmentsToBlank.sort(function(a, b) {
            return a[0] - b[0];
        });
        // handle the case of nested segments : "console.log(console.log('foo'))"
        removeNestedSegments(segmentsToBlank);
        return segmentsToBlank;
    }
909700
function isReactCreateClassCallModular(path: NodePath): boolean {
  if (t.ExpressionStatement.check(path.node)) {
    path = path.get('expression');
  }

  if (!match(path.node, { type: 'CallExpression' })) {
    return false;
  }
  const module = resolveToModule(path);
  return Boolean(module && module === 'create-react-class');
}
966449
function If(transform, node) {
  var if_ = ifHelper(transform, node);
  var block = es.BlockStatement(null, [if_]);
  var fn = es.FunctionExpression(null, null, [], block);
  return es.CallExpression(null, fn, []);
}
168986
function isPromiseRejectCall(node) {
            return node.callee.type === "MemberExpression" &&
                node.callee.object.type === "Identifier" && node.callee.object.name === "Promise" &&
                node.callee.property.type === "Identifier" && node.callee.property.name === "reject";
        }
1192835
function(node){
    if ('default' == node.expr) {
      this.buf.push('default:');
    } else {
      this.buf.push('case ' + node.expr + ':');
    }
    if (node.block) {
      this.visit(node.block, node);
      this.buf.push('  break;');
    }
  }