lib/cc/analyzer/issue_validator.rb in codeclimate-0.25.0 vs lib/cc/analyzer/issue_validator.rb in codeclimate-0.25.1
- old
+ new
@@ -13,13 +13,14 @@
attr_reader :error
def initialize(issue)
@issue = issue
+ validate
end
- def valid?
+ def validate
return @valid unless @valid.nil?
if issue && invalid_messages.any?
@error = {
message: "#{invalid_messages.join("; ")}: `#{issue}`.",
@@ -28,9 +29,10 @@
@valid = false
else
@valid = true
end
end
+ alias valid? validate
private
attr_reader :issue