<commit_before>"use strict";

var util = require("../../../util");
var t    = require("../../../types");

exports.check = function (node) {
  return t.isFunction(node) && hasDefaults(node);
};

var hasDefaults = function (node) {
  for (var i = 0; i < node.params.length; i++) {
    if (!t.isIdentifier(node.params[i])) return true;
  }
  return false;
};

var iifeVisitor = {
  enter: function (node, parent, scope, state) {
    if (t.isReferencedIdentifier(node, parent) && state.scope.hasOwnReference(node.name)) {
      state.iife = true;
      this.stop();
    }
  }
};

exports.Function = function (node, parent, scope, file) {
  if (!hasDefaults(node)) return;<commit_msg>make default parameters iife invocation less serious<commit_after>"use strict";

var util = require("../../../util");
var t    = require("../../../types");

exports.check = function (node) {
  return t.isFunction(node) && hasDefaults(node);
};

var hasDefaults = function (node) {
  for (var i = 0; i < node.params.length; i++) {
    if (!t.isIdentifier(node.params[i])) return true;
  }
  return false;
};

var iifeVisitor = {
  enter: function (node, parent, scope, state) {
    if (!t.isReferencedIdentifier(node, parent)) return;
    if (!state.scope.hasOwnBinding(node.name)) return;
    if (state.scope.bindingEquals(node.name, node)) return;

    state.iife = true;
    this.stop();
  }
};

exports.Function = function (node, parent, scope, file) {
  if (!hasDefaults(node)) return;
{'fraction_non_alphanumeric': 0.1818801089918256, 'fraction_numerical': 0.0013623978201634877, 'mean_word_length': 3.52, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3226584', 'n_tokens_mistral': 490, 'n_tokens_neox': 476, 'n_words': 122}