watson-ruby icon indicating copy to clipboard operation
watson-ruby copied to clipboard

Populate @dirs/files_list first, then check size instead [lib/watson/config.rb]

Open nhmood opened this issue 11 years ago • 0 comments

filename : lib/watson/config.rb line # : 297 tag : review md5 : fa180c7d5ae2f4c9b93042a49c1ae11c

                # [review] - Populate @dirs/files_list first, then check size instead
                if @cl_entry_set
                    debug_print "Directories or files set from command line ignoring rc [dirs]\n"
                    next 
                end

                # Regex to grab directory
                # Then substitute trailing / (necessary for later formatting)
                # Then push to @dir_list
                _mtch = _line.match(/^((\w+)?\.?\/?)+/)[0].gsub(/(\/)+$/, "")
                if !_mtch.empty?
                    @dir_list.push(_mtch) 
                    debug_print "#{ _mtch } added to @dir_list\n"
                end
                debug_print "@dir_list --> #{ @dir_list }\n"

nhmood avatar Nov 21 '13 16:11 nhmood