lib/changelog/changelog_file.rb in danger-changelog-0.6.0 vs lib/changelog/changelog_file.rb in danger-changelog-0.6.1
- old
+ new
@@ -12,12 +12,14 @@
@parser = parser
parser.add_listener(self)
end
- def add_bad_line(line)
- @bad_lines << line
+ def add_bad_line(line, detail = nil)
+ return unless line || detail
+
+ @bad_lines << [line, detail].compact
end
def add_global_failure(message)
@global_failures << message
end
@@ -36,10 +38,10 @@
def global_failures?
global_failures.any?
end
def exists?
- !!@exists
+ @exists
end
def bad?
bad_lines? || global_failures?
end