Sha256: 4e940be31abba0a18fe68fa354916e0a9dac2f48e14851faded0e8b85d1a7866
Contents?: true
Size: 566 Bytes
Versions: 5
Compression:
Stored size: 566 Bytes
Contents
# frozen_string_literal: true class PmdViolation PRIORITY_ERROR_THRESHOLD = 2 attr_accessor :module_name attr_accessor :violation def initialize(module_name, violation) @module_name = module_name @violation = violation end def priority @priority ||= violation.attribute("priority").value.to_i end def type @type ||= priority < PRIORITY_ERROR_THRESHOLD ? :warn : :fail end def line @line ||= violation.attribute("beginline").value.to_i end def description @description ||= violation.text.gsub("\n", "") end end
Version data entries
5 entries across 5 versions & 1 rubygems