From 6d7f7dcc18dd557351675e31ad3f45cd449770c9 Mon Sep 17 00:00:00 2001 From: Aliaksandr Skulin Date: Thu, 14 Nov 2019 17:07:31 +0300 Subject: [PATCH] fixed file filtration --- lib/danger_plugin.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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