class RuboCop::Options
def parse(command_line_args)
def parse(command_line_args) args = args_from_file.concat(args_from_env).concat(command_line_args) define_options.parse!(args) @validator.validate_compatibility if @options[:stdin] # The parser will put the file name given after --stdin into # @options[:stdin]. If it did, then the args array should be empty. raise OptionArgumentError, E_STDIN_NO_PATH if args.any? # We want the STDIN contents in @options[:stdin] and the file name in # args to simplify the rest of the processing. args = [@options[:stdin]] @options[:stdin] = $stdin.binmode.read end [@options, args] end