lib/spoom/cli.rb in spoom-1.0.7 vs lib/spoom/cli.rb in spoom-1.0.8

- old
+ new

@@ -15,30 +15,31 @@ module Cli class Main < Thor extend T::Sig include Helper - class_option :color, desc: "Use colors", type: :boolean, default: true - class_option :path, desc: "Run spoom in a specific path", type: :string, default: ".", aliases: :p + class_option :color, type: :boolean, default: true, desc: "Use colors" + class_option :path, type: :string, default: ".", aliases: :p, desc: "Run spoom in a specific path" + map T.unsafe(%w[--version -v] => :__print_version) - desc "bump", "bump Sorbet sigils from `false` to `true` when no errors" + desc "bump", "Bump Sorbet sigils from `false` to `true` when no errors" subcommand "bump", Spoom::Cli::Bump - desc "config", "manage Sorbet config" + desc "config", "Manage Sorbet config" subcommand "config", Spoom::Cli::Config - desc "coverage", "collect metrics related to Sorbet coverage" + desc "coverage", "Collect metrics related to Sorbet coverage" subcommand "coverage", Spoom::Cli::Coverage - desc "lsp", "send LSP requests to Sorbet" + desc "lsp", "Send LSP requests to Sorbet" subcommand "lsp", Spoom::Cli::LSP - desc "tc", "run Sorbet and parses its output" + desc "tc", "Run Sorbet and parses its output" subcommand "tc", Spoom::Cli::Run - desc "files", "list all the files typechecked by Sorbet" + desc "files", "List all the files typechecked by Sorbet" def files in_sorbet_project! path = exec_path config = Spoom::Sorbet::Config.parse_file(sorbet_config) @@ -51,10 +52,10 @@ tree = FileTree.new(files, strip_prefix: path) tree.print(colors: options[:color], indent_level: 2) end end - desc "--version", "show version" + desc "--version", "Show version" def __print_version puts "Spoom v#{Spoom::VERSION}" end # Utils