Sha256: c408e14e63936b7c85e49902f345a79747cad6523071b032349ad79cd51eb27f

Contents?: true

Size: 679 Bytes

Versions: 18

Compression:

Stored size: 679 Bytes

Contents

module CC
  module Formatters
    class TicketFormatter < CC::Service::Formatter
      def format_vulnerability_title
        if multiple?
          "#{vulnerabilities.size} new #{warning_type} issues found"
        else
          "New #{warning_type} issue found" << location_info
        end
      end

      def format_vulnerability_body
        if multiple?
          "#{vulnerabilities.size} new #{warning_type} issues were found by Code Climate"
        else
          message = "A #{warning_type} vulnerability was found by Code Climate"
          message << location_info
        end

        message << ".\n\n"
        message << details_url
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
codeclimate-services-1.11.4 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.11.3 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.11.2 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.11.1 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.11.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.10.1 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.10.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.9.8 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.9.7 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.9.6 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.9.5 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.9.4 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.9.3 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.9.2 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.9.1 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.9.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.8.0 lib/cc/formatters/ticket_formatter.rb
codeclimate-services-1.7.0 lib/cc/formatters/ticket_formatter.rb