Skip to content

Commit

Permalink
fixed file filtration
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkulinWork committed Nov 14, 2019
1 parent c44d49e commit 6d7f7dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/danger_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6d7f7dc

Please sign in to comment.