function lint(code, results, config, data, file) {
  var globals;
  var lintData;
  var buffer = [];

  config = config || {};
  config = JSON.parse(JSON.stringify(config));

  if (config.prereq) {
    config.prereq.forEach(function(fp) {
      fp = path.join(config.dirname, fp);
      if (fsUtils.exists(fp))
        buffer.push(fsUtils.readFile(fp));
    });
    delete config.prereq;
  }

  if (config.globals) {
    globals = config.globals;
    delete config.globals;
  }

  if (config.overrides) {
    if (file) {
      _.each(config.overrides, function(options, pattern) {
        if (minimatch(path.normalize(file), pattern, { nocase: true, matchBase: true })) {
          if (options.globals) {
            globals = _.extend(globals || {}, options.globals);
            delete options.globals;
          }
          _.extend(config, options);
        }
      });
    }

    delete config.overrides;
  }

  delete config.dirname;

  buffer.push(code);
  buffer = buffer.join("\n");
  buffer = buffer.replace(/^\uFEFF/, ""); // Remove potential Unicode BOM.

  if (!JSHINT(buffer, config, globals)) {
    JSHINT.errors.forEach(function(err) {
      if (err) {
        results.push({ file: file || "stdin", error: err });
      }
    });
  }

  lintData = JSHINT.data();

  if (lintData) {
    lintData.file = file || "stdin";
    data.push(lintData);
  }
}
Runs JSHint against provided file and saves the result

@param {string} code    code that needs to be linted
@param {object} results a pointer to an object with results
@param {object} config  an object with JSHint configuration
@param {object} data    a pointer to an object with extra data
@param {string} file    (optional) file name that is being linted