class Rufo::Command
def format_args(args)
def format_args(args) top_level_dot_file = @filename_for_dot_rufo || Dir.getwd options = @dot_file.get_config_in(top_level_dot_file) || {} file_finder = Rufo::FileFinder.new( args, includes: options[:includes], excludes: options[:excludes], ) files = file_finder.to_a changed = false syntax_error = false files_exist = false files.each do |(exists, file)| if exists files_exist = true else logger.warn("Error: file or directory not found: #{file}") next end result = format_file(file) changed |= result == CODE_CHANGE syntax_error |= result == CODE_ERROR end return CODE_ERROR unless files_exist case when syntax_error then CODE_ERROR when changed then CODE_CHANGE else CODE_OK end end