Skip to content

Commit c259943

Browse files
fix: should be using filter not map
1 parent c78515f commit c259943

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/codeclimate_diff/runner.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ def self.calculate_changed_filenames(pattern)
2727
files_and_directories_excluded = exclude_patterns.map { |exclude_pattern| Dir.glob(exclude_pattern) }.flatten
2828

2929
# filter out any files that match the excluded ones
30-
all_files_changed.map do |filename|
30+
all_files_changed.filter do |filename|
3131
next if files_and_directories_excluded.include? filename
3232

3333
next if files_and_directories_excluded.any? { |excluded_filename| filename.start_with?(excluded_filename) }
3434

35-
filename
35+
true
3636
end
3737
end
3838

0 commit comments

Comments
 (0)