Sha256: 5c77f6e315e10dd1bf4f5a5e2c56810fc7e0aa9dee11b621dbc64309ed2c2055
Contents?: true
Size: 739 Bytes
Versions: 1
Compression:
Stored size: 739 Bytes
Contents
class BugIssue RANK_ERROR_THRESHOLD = 4 attr_accessor :module_name attr_accessor :buginfo def initialize(module_name, buginfo) @module_name = module_name @buginfo = buginfo end def rank @rack ||= buginfo.attribute("rank").value.to_i end def type @type ||= rank > RANK_ERROR_THRESHOLD ? :warning : :error end def line @line ||= buginfo.xpath("SourceLine/@start").first.to_s.to_i end def source_path @source_path ||= buginfo.xpath("SourceLine/@sourcepath").first.to_s end def description @description ||= buginfo.xpath("LongMessage/text()").first.text end def absolute_path @absolute_path ||= Pathname.new(module_name).join("src/main/java", source_path).to_s end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
danger-findbugs-0.0.1 | lib/findbugs/bug_issue.rb |