Class: Spoom::Cli::Config

Inherits:
Thor
  • Object
show all
Includes:
Helper
Defined in:
lib/spoom/cli/config.rb

Constant Summary

Constants included from Helper

Helper::HIGHLIGHT_COLOR

Instance Method Summary collapse

Methods included from Helper

#blue, #check_sorbet_segfault, #color?, #colorize, #cyan, #exec_path, #gray, #green, #highlight, #in_sorbet_project!, #in_sorbet_project?, #red, #say, #say_error, #sorbet_config, #sorbet_config_file, #yellow

Methods included from Spoom::Colorize

#set_color

Instance Method Details

#showObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/spoom/cli/config.rb', line 15

def show
  in_sorbet_project!
  config = sorbet_config

  say("Found Sorbet config at `#{sorbet_config_file}`.")

  say("\nPaths typechecked:")
  if config.paths.empty?
    say(" * (default: .)")
  else
    config.paths.each do |path|
      say(" * #{path}")
    end
  end

  say("\nPaths ignored:")
  if config.ignore.empty?
    say(" * (default: none)")
  else
    config.ignore.each do |path|
      say(" * #{path}")
    end
  end

  say("\nAllowed extensions:")
  if config.allowed_extensions.empty?
    say(" * .rb (default)")
    say(" * .rbi (default)")
  else
    config.allowed_extensions.each do |ext|
      say(" * #{ext}")
    end
  end
end