function fileFor(file) {
    if (!file) { return null; }

    // Filenames are the same across source and externs, so prefer source files.
    for (const files of [options.jsCode, options.externs]) {
      if (!files) { continue; }

      for (const cand of files) {
        if (cand.path == file) {
          return cand;
        }
      }
    }

    return null;
  }
@param {!Object} options
@param {!Object} output
@param {function(string)} logger
@return {boolean} Whether this output should fail a compilation.