Sha256: 1e017be7d3f4aa2187b761996094c1805573b992e43fa706c031f95f33b16cb5

Contents?: true

Size: 794 Bytes

Versions: 43

Compression:

Stored size: 794 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] <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

43 entries across 43 versions & 1 rubygems

Version Path
codeclimate-0.24.3 lib/cc/cli/help.rb
codeclimate-0.24.2 lib/cc/cli/help.rb
codeclimate-0.24.1 lib/cc/cli/help.rb
codeclimate-0.24.0 lib/cc/cli/help.rb
codeclimate-0.23.0 lib/cc/cli/help.rb
codeclimate-0.22.3 lib/cc/cli/help.rb
codeclimate-0.22.2 lib/cc/cli/help.rb
codeclimate-0.22.1 lib/cc/cli/help.rb
codeclimate-0.22.0 lib/cc/cli/help.rb
codeclimate-0.21.4 lib/cc/cli/help.rb
codeclimate-0.21.3 lib/cc/cli/help.rb
codeclimate-0.21.2 lib/cc/cli/help.rb
codeclimate-0.21.1 lib/cc/cli/help.rb
codeclimate-0.21.0 lib/cc/cli/help.rb
codeclimate-0.20.2 lib/cc/cli/help.rb
codeclimate-0.20.1 lib/cc/cli/help.rb
codeclimate-0.20.0 lib/cc/cli/help.rb
codeclimate-0.19.2 lib/cc/cli/help.rb
codeclimate-0.19.1 lib/cc/cli/help.rb
codeclimate-0.19.0 lib/cc/cli/help.rb