Class: Evilution::CLI::Commands::Run
- Inherits:
-
Evilution::CLI::Command
- Object
- Evilution::CLI::Command
- Evilution::CLI::Commands::Run
- Defined in:
- lib/evilution/cli/commands/run.rb
Instance Method Summary collapse
Methods inherited from Evilution::CLI::Command
Constructor Details
This class inherits a constructor from Evilution::CLI::Command
Instance Method Details
#call ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/evilution/cli/commands/run.rb', line 15 def call = Evilution::Config. config = nil raise Evilution::ConfigError, @stdin_error if @stdin_error config = Evilution::Config.new(**@options, target_files: @files, line_ranges: @line_ranges) hooks = build_hooks(config) runner = Evilution::Runner.new(config: config, hooks: hooks) summary = runner.call exit_code = summary.success?(min_score: config.min_score) ? 0 : 1 Evilution::CLI::Result.new(exit_code: exit_code) rescue Evilution::Error => e handle_error(e, config, ) end |