diff --git a/lib/xcov/ignore_handler.rb b/lib/xcov/ignore_handler.rb index 2811e55..85d61af 100644 --- a/lib/xcov/ignore_handler.rb +++ b/lib/xcov/ignore_handler.rb @@ -28,7 +28,9 @@ def should_ignore_file_at_path path # Also ignore the files from ignored folders relative = relative_path(path).downcase - return @list.any? { |ignored_path| relative.start_with? ignored_path } + return true if @list.any? { |ignored_path| relative.start_with? ignored_path } + + return @list.any? { |pattern| relative =~ Regexp.new("#{pattern}$") } end # Static methods