class PmdTester::PmdConfigError
This class represents a 'configerror' element of Pmd xml report and which Pmd branch the 'configerror' is from
Attributes
attrs[R]
The schema of 'configerror' node: <xs:complexType name=“configerror”>
<xs:attribute name="rule" type="xs:string" use="required" /> <xs:attribute name="msg" type="xs:string" use="required" />
</xs:complexType>
branch[R]
The pmd branch type, 'base' or 'patch'
old_error[RW]
Public Class Methods
new(attrs, branch)
click to toggle source
# File lib/pmdtester/pmd_configerror.rb, line 18 def initialize(attrs, branch) @attrs = attrs @changed = false @branch = branch end
Public Instance Methods
changed?()
click to toggle source
# File lib/pmdtester/pmd_configerror.rb, line 37 def changed? @changed end
eql?(other)
click to toggle source
# File lib/pmdtester/pmd_configerror.rb, line 41 def eql?(other) rulename.eql?(other.rulename) && msg.eql?(other.msg) end
hash()
click to toggle source
# File lib/pmdtester/pmd_configerror.rb, line 58 def hash [rulename, msg].hash end
msg()
click to toggle source
# File lib/pmdtester/pmd_configerror.rb, line 29 def msg @attrs['msg'] end
rulename()
click to toggle source
# File lib/pmdtester/pmd_configerror.rb, line 25 def rulename @attrs['rule'] end
sort_key()
click to toggle source
# File lib/pmdtester/pmd_configerror.rb, line 33 def sort_key rulename end
try_merge?(other)
click to toggle source
# File lib/pmdtester/pmd_configerror.rb, line 45 def try_merge?(other) if branch != BASE && branch != other.branch && rulename == other.rulename && !changed? # not already changed @changed = true @old_error = other true end false end