File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ class Options
290290 :target_ruby_version
291291
292292 def initialize ( print_width : DEFAULT_PRINT_WIDTH )
293- @ignore_files = ""
293+ @ignore_files = [ ]
294294 @plugins = [ ]
295295 @print_width = print_width
296296 @scripts = [ ]
@@ -313,7 +313,7 @@ def parser
313313 # Any of the CLI commands that operate on filenames will then ignore
314314 # this set of files.
315315 opts . on ( "--ignore-files=GLOB" ) do |glob |
316- @ignore_files = glob . match ( /\A '(.*)'\z / ) ? $1 : glob
316+ @ignore_files << ( glob . match ( /\A '(.*)'\z / ) ? $1 : glob )
317317 end
318318
319319 # If there are any plugins specified on the command line, then load
@@ -434,7 +434,7 @@ def run(argv)
434434 . glob ( pattern )
435435 . each do |filepath |
436436 if File . readable? ( filepath ) &&
437- ! File . fnmatch? ( options . ignore_files , filepath )
437+ options . ignore_files . none? { File . fnmatch? ( _1 , filepath ) }
438438 queue << FileItem . new ( filepath )
439439 end
440440 end
You can’t perform that action at this time.
0 commit comments