Sha256: 62b71f477378e76e5bfe96d717a489e60bcabb8de3e166a15de6fc3456ed8807

Contents?: true

Size: 804 Bytes

Versions: 22

Compression:

Stored size: 804 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] [-e engine(:channel)] <path>",
          "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

22 entries across 22 versions & 1 rubygems

Version Path
codeclimate-0.40.3 lib/cc/cli/help.rb
codeclimate-0.40.2 lib/cc/cli/help.rb
codeclimate-0.40.1 lib/cc/cli/help.rb
codeclimate-0.40.0 lib/cc/cli/help.rb
codeclimate-0.39.0 lib/cc/cli/help.rb
codeclimate-0.38.1 lib/cc/cli/help.rb
codeclimate-0.38.0 lib/cc/cli/help.rb
codeclimate-0.37.0 lib/cc/cli/help.rb
codeclimate-0.36.0 lib/cc/cli/help.rb
codeclimate-0.35.2 lib/cc/cli/help.rb
codeclimate-0.35.1 lib/cc/cli/help.rb
codeclimate-0.35.0 lib/cc/cli/help.rb
codeclimate-0.34.1 lib/cc/cli/help.rb
codeclimate-0.34.0 lib/cc/cli/help.rb
codeclimate-0.33.0 lib/cc/cli/help.rb
codeclimate-0.32.1 lib/cc/cli/help.rb
codeclimate-0.32.0 lib/cc/cli/help.rb
codeclimate-0.32.0.rc1 lib/cc/cli/help.rb
codeclimate-0.31.1 lib/cc/cli/help.rb
codeclimate-0.31.0 lib/cc/cli/help.rb