lib/jazzy/undocumented_reader.rb in danger-jazzy-1.0.2 vs lib/jazzy/undocumented_reader.rb in danger-jazzy-1.1.0
- old
+ new
@@ -24,10 +24,12 @@
@data = JSON.parse(File.read(path))
@working_path = Pathname.new(@data['source_directory'])
end
def item_file(item)
- path = Pathname.new(item['file'])
+ file = item['file']
+ return unless file
+ path = Pathname.new(file)
path.relative_path_from(@working_path).to_s
end
def item_valid?(item)
item['warning'] == 'undocumented'