function createWarning(error, filepath, location) {
  return {
    text: error.message,
    location: {
      file: filepath,
      line: location.line,
      column: location.column,
    },
  };
}
@param {Error} error
@param {string} filepath
@param {{line: number, column: number}} location
@return {Warning}