Class: RubynCode::CLI::Commands::ChiselDebt
- Inherits:
-
Base
- Object
- Base
- RubynCode::CLI::Commands::ChiselDebt
show all
- Defined in:
- lib/rubyn_code/cli/commands/chisel_debt.rb
Overview
‘/chisel-debt` — harvest inline `chisel:` deferral markers from the codebase into a ledger view so postponed simplifications aren’t lost.
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
aliases, all_names, hidden?
Class Method Details
.command_name ⇒ Object
9
|
# File 'lib/rubyn_code/cli/commands/chisel_debt.rb', line 9
def self.command_name = '/chisel-debt'
|
.description ⇒ Object
10
|
# File 'lib/rubyn_code/cli/commands/chisel_debt.rb', line 10
def self.description = 'List deferred `chisel:` markers in the codebase'
|
Instance Method Details
#execute(_args, ctx) ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/rubyn_code/cli/commands/chisel_debt.rb', line 12
def execute(_args, ctx)
items = RubynCode::Chisel::Debt.scan(ctx.project_root)
return ctx.renderer.info('No chisel: debt markers found — clean.') if items.empty?
ctx.renderer.info("Chisel debt — #{items.size} deferred #{pluralize(items.size, 'simplification')}:")
items.each { |item| ctx.renderer.info(" #{item.file}:#{item.line} — #{item.note}") }
end
|