Class: Spoom::Cli::Config

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

Instance Method Summary collapse

Methods included from Helper

#color?, #colorize, #exec_path, #in_sorbet_project!, #in_sorbet_project?, #say_error, #sorbet_config

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 = Spoom::Sorbet::Config.parse_file(sorbet_config)

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

  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