Sha256: 65b10ab835102de589cd56f570e5fe2d868ba05487d3b76b461d80f7b59d0456

Contents?: true

Size: 775 Bytes

Versions: 7

Compression:

Stored size: 775 Bytes

Contents

require "rainbow"

module CC
  module CLI
    class Help < Command
      def run
        say "Usage: codeclimate COMMAND ...\n\nAvailable commands:\n"
        commands.each do |command|
          say "    #{command}"
        end
      end

      private

      def commands
        [
          "analyze [-f format]",
          "console",
          "engines:disable #{underline('engine_name')}",
          "engines:enable #{underline('engine_name')}",
          "engines:install",
          "engines:list",
          "engines:remove #{underline('engine_name')}",
          "help",
          "init",
          "validate-config",
          "version",
        ].freeze
      end

      def underline(string)
        Rainbow.new.wrap(string).underline
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
codeclimate-0.14.2 lib/cc/cli/help.rb
codeclimate-0.14.1 lib/cc/cli/help.rb
codeclimate-0.14.0 lib/cc/cli/help.rb
codeclimate-0.13.0 lib/cc/cli/help.rb
codeclimate-0.11.0 lib/cc/cli/help.rb
codeclimate-0.10.1 lib/cc/cli/help.rb
codeclimate-0.10.0 lib/cc/cli/help.rb