diff --git a/lib/xcode_summary/plugin.rb b/lib/xcode_summary/plugin.rb index b2fbc8b..5e4edee 100644 --- a/lib/xcode_summary/plugin.rb +++ b/lib/xcode_summary/plugin.rb @@ -207,7 +207,8 @@ def errors(xcode_summary) def parse_location(input) file_path, line, _column = input[:file_path].split(':') - Location.new(input[:file_name], file_path, line.to_i) + file_name = relative_path(file_path) + Location.new(file_name, file_path, line.to_i) end def parse_test_location(failure) diff --git a/spec/xcode_summary_spec.rb b/spec/xcode_summary_spec.rb index 6f294da..34def4b 100644 --- a/spec/xcode_summary_spec.rb +++ b/spec/xcode_summary_spec.rb @@ -131,13 +131,13 @@ module Danger expect(@xcode_summary).to have_received(:warn).with( instance_of(String), sticky: false, - file: 'Bla.m', + file: 'MyWeight/Bla.m', line: 32 ) expect(@xcode_summary).to have_received(:warn).with( instance_of(String), sticky: false, - file: 'ISO8601DateFormatter.m', + file: 'MyWeight/Pods/ISO8601DateFormatter/ISO8601DateFormatter.m', line: 176 ) end