Class: CC::Formatters::TicketFormatter

Inherits:
Service::Formatter show all
Defined in:
lib/cc/formatters/ticket_formatter.rb

Instance Attribute Summary

Attributes inherited from Service::Formatter

#options

Instance Method Summary collapse

Methods inherited from Service::Formatter

#initialize

Constructor Details

This class inherits a constructor from CC::Service::Formatter

Instance Method Details

#format_vulnerability_bodyObject



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/cc/formatters/ticket_formatter.rb', line 12

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

#format_vulnerability_titleObject



4
5
6
7
8
9
10
# File 'lib/cc/formatters/ticket_formatter.rb', line 4

def format_vulnerability_title
  if multiple?
    "#{vulnerabilities.size} new #{warning_type} issues found"
  else
    "New #{warning_type} issue found" << location_info
  end
end