lib/mutant/cli.rb in mutant-0.9.12 vs lib/mutant/cli.rb in mutant-0.9.13

- old
+ new

@@ -1,9 +1,11 @@ # frozen_string_literal: true module Mutant # Commandline parser / runner + # + # rubocop:disable Metrics/ClassLength class CLI include Concord.new(:world, :config) private_class_method :new @@ -124,10 +126,13 @@ # rubocop:disable Metrics/MethodLength def add_filter_options(opts) opts.on('--ignore-subject EXPRESSION', 'Ignore subjects that match EXPRESSION as prefix') do |pattern| add_matcher(:ignore_expressions, config.expression_parser.apply(pattern).from_right) end + opts.on('--start-subject EXPRESSION', 'Start mutation testing at a specific subject') do |pattern| + add_matcher(:start_expressions, config.expression_parser.apply(pattern).from_right) + end opts.on('--since REVISION', 'Only select subjects touched since REVISION') do |revision| add_matcher( :subject_filters, Repository::SubjectFilter.new( Repository::Diff.new(to: revision, world: world) @@ -163,6 +168,7 @@ def add_matcher(attribute, value) with(matcher: config.matcher.add(attribute, value)) end end # CLI + # rubocop:enable Metrics/ClassLength end # Mutant