You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: favicon.rb
    path of file: ./repos/html-proofer/lib/html_proofer/check
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module HTMLProofer
  class Check
    class Favicon < HTMLProofer::Check
      def run
        found = false
        @html.css("link").each do |node|
          @favicon = create_element(node)

          next if @favicon.ignore?

          break if (fo
    
      def run
        found = false
        @html.css("link").each do |node|
          @favicon = create_element(node)

          next if @favicon.ignore?

          break if (found = @favicon.node["rel"].split.last.eql?("icon"))
        end

        return if immediate_redirect?

        if found
          if @favicon.url.protocol_relative?
            add_failure(
              "favicon link #{@favicon.url} is a protocol-relative URL, use explicit https:// instead",
              element: @favicon,
            )
          elsif @favicon.url.remote?
            add_to_external_urls(@favicon.url, @favicon.line)
          elsif !@favicon.url.exists?
            add_failure(
              "internal favicon #{@favicon.url.raw_attribute} does not exist",
              element: @favicon,
            )
          end
        else
          add_failure("no favicon provided")
        end