Class: Moult::CLI::CoverageCommand
- Inherits:
-
Object
- Object
- Moult::CLI::CoverageCommand
- Defined in:
- lib/moult/cli/coverage_command.rb
Overview
moult coverage [PATH] --coverage FILE — a per-symbol hot/cold/untracked
map resolved from a local coverage file. Thin layer: parse options, build
the index, load the dataset, drive Moult::CoverageReport.build, format. The map
is diagnostic; it makes no dead-code claim (see moult deadcode --coverage
for the confidence merge).
Constant Summary collapse
- VALID_FORMATS =
%i[auto simplecov coverage].freeze
Instance Method Summary collapse
-
#run(argv) ⇒ Integer
Process exit status.
Instance Method Details
#run(argv) ⇒ Integer
Returns process exit status.
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 |
# File 'lib/moult/cli/coverage_command.rb', line 17 def run(argv) = parse(argv) return puts_help() if [:help] unless [:coverage] warn "moult: coverage requires --coverage PATH" warn @parser return 1 end root = File.([:path]) unless File.exist?(root) warn "moult: no such file or directory: #{[:path]}" return 1 end puts render(analyze(root, ), ) 0 rescue OptionParser::ParseError => e warn "moult: #{e.}" 1 rescue => e warn "moult: #{e.}" 1 end |