class BugIssue

Constants

RANK_ERROR_THRESHOLD

Attributes

buginfo[RW]
module_name[RW]

Public Class Methods

new(module_name, buginfo) click to toggle source
# File lib/findbugs/bug_issue.rb, line 6
def initialize(module_name, buginfo)
  @module_name = module_name
  @buginfo = buginfo
end

Public Instance Methods

absolute_path() click to toggle source
# File lib/findbugs/bug_issue.rb, line 31
def absolute_path
  @absolute_path ||= Pathname.new(module_name).join("src/main/java", source_path).to_s
end
description() click to toggle source
# File lib/findbugs/bug_issue.rb, line 27
def description
  @description ||= buginfo.xpath("LongMessage/text()").first.text
end
line() click to toggle source
# File lib/findbugs/bug_issue.rb, line 19
def line
  @line ||= buginfo.xpath("SourceLine/@start").first.to_s.to_i
end
rank() click to toggle source
# File lib/findbugs/bug_issue.rb, line 11
def rank
  @rack ||= buginfo.attribute("rank").value.to_i
end
source_path() click to toggle source
# File lib/findbugs/bug_issue.rb, line 23
def source_path
  @source_path ||= buginfo.xpath("SourceLine/@sourcepath").first.to_s
end
type() click to toggle source
# File lib/findbugs/bug_issue.rb, line 15
def type
  @type ||= rank > RANK_ERROR_THRESHOLD ? :warn : :fail
end