troessner/reek

View on GitHub
lib/reek/report/documentation_link_warning_formatter.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

require_relative 'simple_warning_formatter'

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