Class: Docquet::CLI::InstallConfig

Inherits:
Base
  • Object
show all
Defined in:
lib/docquet/cli/install_config.rb

Instance Method Summary collapse

Instance Method Details

#call(force: false) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/docquet/cli/install_config.rb', line 10

def call(force: false, **)
  check_existing_files(force)

  # Processing order is important for correct TODO file generation:
  # 1. Create empty .rubocop_todo.yml first to prevent reference errors
  # 2. Generate .rubocop.yml with gem configuration
  # 3. Generate actual .rubocop_todo.yml with gem rules applied
  # This ensures TODO file reflects violations against gem configuration

  create_empty_todo_file

  generator = Generators::RuboCopYMLGenerator.new
  generator.generate
  puts "✓ Generated .rubocop.yml"

  generate_todo_file

  show_completion_message
end