def parse(args)
      @options = {}

      OptionParser.new do |parser|
        parser.banner = "Usage: #{APP_NAME} [options] [file1, file2, ...]"

        add_linter_options parser
        add_report_options parser
        add_file_options parser
        add_logger_options parser
        add_info_options parser
      end.parse!(args)

      # Any remaining arguments are assumed to be files
      @options[:files] = args.empty? ? ['.'] : args

      @options
    rescue OptionParser::InvalidOption => e
      raise Exceptions::InvalidCLIOption, e.message, e.backtrace
    end
def parse(args)
      @options = {}

      OptionParser.new do |parser|
        parser.banner = "Usage: #{APP_NAME} [options] [file1, file2, ...]"

        add_linter_options parser
        add_report_options parser
        add_file_options parser
        add_logger_options parser
        add_info_options parser
      end.parse!(args)

      # Any remaining arguments are assumed to be files
      @options[:files] = args.empty? ? ['.'] : args

      @options
    rescue OptionParser::InvalidOption => e
      raise Exceptions::InvalidCLIOption, e.message, e.backtrace
    end
Parses command line options into an options hash.

 @param args [Array<String>] arguments passed via the command line
 @return [Hash] parsed options