Class: AnalyzeCommand

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/depcheck/command/analyze_command.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/depcheck/command/analyze_command.rb', line 6

def execute

  unless project || (workspace && scheme)
    raise StandardError, 'Must provide project path or workspace path with scheme.'
  end

  swiftdeps = Depcheck::Finder.find_swiftdeps(project, workspace, scheme)
  results = Depcheck::Analyzer.generate_dependencies(swiftdeps)
  Depcheck::SimpleOutput.post(results)
end