Sha256: 9ece0ec07904100ec20a88650b5e6aeaffed576dae6170faec92f4b4310ee75b

Contents?: true

Size: 536 Bytes

Versions: 1

Compression:

Stored size: 536 Bytes

Contents

# frozen_string_literal: true

require_relative 'simple_warning_formatter'

module Reek
  module Report
    module Formatter
      #
      # Formatter that adds a link to the wiki to the basic message from
      # SimpleWarningFormatter.
      #
      class WikiLinkWarningFormatter < SimpleWarningFormatter
        def format(warning)
          "#{super} [#{warning.explanatory_link}]"
        end

        def format_hash(warning)
          super.merge('wiki_link' => warning.explanatory_link)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
reek-4.8.2 lib/reek/report/formatter/wiki_link_warning_formatter.rb