Class: RosettAi::Thor::Tasks::Adopt

Inherits:
Thor
  • Object
show all
Defined in:
lib/rosett_ai/thor/tasks/adopt.rb

Overview

Thor task for analyzing compiled rule files using the Claude API

Instance Method Summary collapse

Instance Method Details

#analyzeObject



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/rosett_ai/thor/tasks/adopt.rb', line 59

def analyze
  adopter = build_adopter
  files = adopter.discover_managed_files

  if files.empty?
    puts Rainbow(t('no_files')).yellow
    return
  end

  log_verbose(t('found_files', count: files.size))

  sensitive = adopter.sensitive_files
  log_verbose(t('sensitive_skipped', count: sensitive.size)) unless sensitive.empty?
  if options[:verbose] && !sensitive.empty?
    sensitive.each { |f| puts "  #{Rainbow(File.basename(f)).yellow} #{t('sensitive_label')}" }
  end

  outcome = run_analysis(adopter)
  print_results(outcome)
end