Class: Moult::CLI::BoundariesCommand
- Inherits:
-
Object
- Object
- Moult::CLI::BoundariesCommand
- Defined in:
- lib/moult/cli/boundaries_command.rb
Overview
moult boundaries [PATH] — list recorded architecture-boundary violations from
the project's packwerk artifacts, classified by severity. Thin layer: parse
options, drive the library, hand the BoundariesReport to a formatter.
Report-only: exit 0 on success (including when the project is not
packwerk-configured), non-zero only on error.
Instance Method Summary collapse
-
#run(argv) ⇒ Integer
Process exit status.
Instance Method Details
#run(argv) ⇒ Integer
Returns process exit status.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/moult/cli/boundaries_command.rb', line 15 def run(argv) = parse(argv) return puts_help() if [:help] root = File.([:path]) unless File.exist?(root) warn "moult: no such file or directory: #{[:path]}" return 1 end report = analyze(root, ) puts render(report, ) 0 rescue OptionParser::ParseError => e warn "moult: #{e.}" 1 rescue => e warn "moult: #{e.}" 1 end |