diff --git a/lib/danger_plugin.rb b/lib/danger_plugin.rb index 09b204e..0477d44 100644 --- a/lib/danger_plugin.rb +++ b/lib/danger_plugin.rb @@ -91,10 +91,10 @@ def xcov_available? # Filters the files that haven't been modified in the current PR def process_report(report) - file_names = @dangerfile.git.modified_files.map { |file| File.basename(file) } - file_names += @dangerfile.git.added_files.map { |file| File.basename(file) } + file_names = @dangerfile.git.modified_files.map { |file| File.expand_path(file) } + file_names += @dangerfile.git.added_files.map { |file| File.expand_path(file) } report.targets.each do |target| - target.files = target.files.select { |file| file_names.include?(file.name) } + target.files = target.files.select { |file| file_names.include?(file.location) } end report