mutant 0.12.2 → 0.12.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mutant/ast/named_children.rb +2 -2
  3. data/lib/mutant/ast/pattern/lexer.rb +6 -6
  4. data/lib/mutant/ast/pattern/parser.rb +9 -9
  5. data/lib/mutant/ast/structure.rb +1 -1
  6. data/lib/mutant/ast.rb +1 -1
  7. data/lib/mutant/bootstrap.rb +12 -12
  8. data/lib/mutant/cli/command/environment/test.rb +2 -2
  9. data/lib/mutant/cli/command/environment.rb +8 -8
  10. data/lib/mutant/cli/command/util.rb +2 -2
  11. data/lib/mutant/cli/command.rb +8 -8
  12. data/lib/mutant/cli.rb +1 -1
  13. data/lib/mutant/config.rb +2 -2
  14. data/lib/mutant/env.rb +10 -10
  15. data/lib/mutant/expression/descendants.rb +1 -1
  16. data/lib/mutant/expression/method.rb +2 -2
  17. data/lib/mutant/expression/methods.rb +2 -2
  18. data/lib/mutant/expression/source.rb +3 -3
  19. data/lib/mutant/integration.rb +2 -2
  20. data/lib/mutant/isolation/fork.rb +4 -4
  21. data/lib/mutant/isolation/none.rb +2 -2
  22. data/lib/mutant/matcher/descendants.rb +1 -1
  23. data/lib/mutant/matcher/method/instance.rb +3 -3
  24. data/lib/mutant/matcher/method/metaclass.rb +2 -2
  25. data/lib/mutant/matcher/method/singleton.rb +1 -1
  26. data/lib/mutant/matcher/method.rb +5 -19
  27. data/lib/mutant/matcher/methods.rb +2 -2
  28. data/lib/mutant/matcher/namespace.rb +1 -1
  29. data/lib/mutant/matcher/scope.rb +1 -1
  30. data/lib/mutant/matcher.rb +1 -1
  31. data/lib/mutant/meta/example/verification.rb +1 -1
  32. data/lib/mutant/meta/example.rb +4 -4
  33. data/lib/mutant/meta.rb +1 -1
  34. data/lib/mutant/mutation/runner/sink.rb +3 -3
  35. data/lib/mutant/mutation/runner.rb +1 -1
  36. data/lib/mutant/mutation.rb +2 -2
  37. data/lib/mutant/mutator/node/block.rb +1 -1
  38. data/lib/mutant/mutator/node/break.rb +1 -1
  39. data/lib/mutant/mutator/node/index.rb +1 -1
  40. data/lib/mutant/mutator/node/kwbegin.rb +1 -1
  41. data/lib/mutant/mutator/node/named_value/access.rb +1 -1
  42. data/lib/mutant/mutator/node/next.rb +1 -1
  43. data/lib/mutant/mutator/node/send/conditional.rb +1 -1
  44. data/lib/mutant/mutator/node/send.rb +1 -1
  45. data/lib/mutant/mutator/node/yield.rb +1 -1
  46. data/lib/mutant/mutator/node/zsuper.rb +0 -1
  47. data/lib/mutant/mutator/node.rb +5 -5
  48. data/lib/mutant/mutator/regexp.rb +2 -2
  49. data/lib/mutant/parallel/connection.rb +2 -2
  50. data/lib/mutant/parallel/pipe.rb +2 -2
  51. data/lib/mutant/parallel/worker.rb +10 -10
  52. data/lib/mutant/parallel.rb +3 -3
  53. data/lib/mutant/parser.rb +1 -1
  54. data/lib/mutant/registry.rb +1 -1
  55. data/lib/mutant/reporter/cli/format.rb +1 -1
  56. data/lib/mutant/reporter/cli/printer/isolation_result.rb +2 -2
  57. data/lib/mutant/reporter/cli/printer/status_progressive.rb +1 -1
  58. data/lib/mutant/reporter/cli/printer/test.rb +1 -1
  59. data/lib/mutant/reporter/cli/printer.rb +1 -1
  60. data/lib/mutant/reporter/cli.rb +3 -3
  61. data/lib/mutant/repository/diff.rb +6 -5
  62. data/lib/mutant/segment/recorder.rb +8 -8
  63. data/lib/mutant/subject/config.rb +1 -1
  64. data/lib/mutant/subject/method/instance.rb +1 -1
  65. data/lib/mutant/subject.rb +1 -1
  66. data/lib/mutant/test/runner/sink.rb +1 -1
  67. data/lib/mutant/test/runner.rb +1 -1
  68. data/lib/mutant/timer.rb +2 -2
  69. data/lib/mutant/transform.rb +20 -20
  70. data/lib/mutant/variable.rb +2 -2
  71. data/lib/mutant/version.rb +1 -1
  72. data/lib/mutant/world.rb +7 -7
  73. data/lib/mutant.rb +8 -8
  74. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b917d54d9bc5f8bd16f530001c6cf983ad0a0970d3e837f0736b31efb81e5c8d
4
- data.tar.gz: 499669d7e30d80698a154b27f37f52893b504b30bb70b6edd473f118c9d49c74
3
+ metadata.gz: c0c3d3cd37cf5828adc4b80c8ba1d0b51c4d0ae372745841c58d5945934938fa
4
+ data.tar.gz: 2c2f98e60fa4676123916cca4829557c91fe3233bfdaf264b3f4b3165930bd28
5
5
  SHA512:
6
- metadata.gz: caea8e933129291143d45128074ffeb821ad1acf2f8b9742351b5512c867f8909512c8f6716dca423c49d912ecfae631caea7543d6862f9c5193694b393ad624
7
- data.tar.gz: 336f5ed118fa5f63cf5b30f080ab3218fa488937a5f75bf8b486ed77b8869fd1c69e57414f4f8453d8e29c00c016b483e9cda02d91ccd4b1ec166494c0aa9bee
6
+ metadata.gz: 946e48362be2a8a9c619280143ff09ae8b3c1a00cca7e6e5bbc6e436b1325f6c9d55cd3c1834b800e813a0a6ff4e9bd62456ce9504402bd99ab9802d15b809f5
7
+ data.tar.gz: a425a10f6af02f315e3e11e88c3595577f9c599511ed54b9bb454f42604dff0697769cdd41bdab01a446f4cc99d279f1ea60e72e4e80be0c1242d2fd0dd50486
@@ -83,8 +83,8 @@ module Mutant
83
83
  # @param [Symbol] name
84
84
  #
85
85
  # @return [undefined]
86
- def define_private_method(name, &block)
87
- define_method(name, &block)
86
+ def define_private_method(name, &)
87
+ define_method(name, &)
88
88
  private(name)
89
89
  end
90
90
 
@@ -43,7 +43,7 @@ module Mutant
43
43
  @line_index = 0
44
44
  @line_start = 0
45
45
  @next_position = 0
46
- @source = Source.new(string: string)
46
+ @source = Source.new(string:)
47
47
  @string = string
48
48
  @tokens = []
49
49
  end
@@ -77,13 +77,13 @@ module Mutant
77
77
 
78
78
  advance_position
79
79
 
80
- @tokens << token(type: type, start_position: start_position)
80
+ @tokens << token(type:, start_position:)
81
81
  end
82
82
 
83
83
  def token(type:, start_position:, value: nil)
84
84
  Token.new(
85
- type: type,
86
- value: value,
85
+ type:,
86
+ value:,
87
87
  location: Source::Location.new(
88
88
  source: @source,
89
89
  line_index: @line_index,
@@ -101,7 +101,7 @@ module Mutant
101
101
  if valid_string?(token.value)
102
102
  @tokens << token
103
103
  else
104
- @error = Error::InvalidToken.new(token: token)
104
+ @error = Error::InvalidToken.new(token:)
105
105
  end
106
106
  end
107
107
 
@@ -123,7 +123,7 @@ module Mutant
123
123
  token(
124
124
  type: :string,
125
125
  value: string,
126
- start_position: start_position
126
+ start_position:
127
127
  )
128
128
  end
129
129
 
@@ -28,7 +28,7 @@ module Mutant
28
28
  token = peek
29
29
  error(
30
30
  message: "Unexpected token: #{token.type}",
31
- token: token
31
+ token:
32
32
  )
33
33
  end
34
34
  end
@@ -74,15 +74,15 @@ module Mutant
74
74
  end
75
75
 
76
76
  Node.new(
77
- attribute: attribute,
78
- descendant: descendant,
77
+ attribute:,
78
+ descendant:,
79
79
  type: structure.type
80
80
  )
81
81
  end
82
82
 
83
83
  def parse_attribute(name)
84
84
  Node::Attribute.new(
85
- name: name,
85
+ name:,
86
86
  value: parse_alternative(
87
87
  group_start: method(:parse_attribute_group),
88
88
  string: method(:parse_attribute_value)
@@ -96,14 +96,14 @@ module Mutant
96
96
  alternatives.fetch(token.type) do
97
97
  error(
98
98
  message: "Expected one of: #{alternatives.keys.join(',')} but got: #{token.type}",
99
- token: token
99
+ token:
100
100
  )
101
101
  end.call
102
102
  end
103
103
 
104
104
  def parse_descendant(name)
105
105
  Node::Descendant.new(
106
- name: name,
106
+ name:,
107
107
  pattern: parse_node
108
108
  )
109
109
  end
@@ -120,7 +120,7 @@ module Mutant
120
120
 
121
121
  expect(:group_end)
122
122
 
123
- Node::Attribute::Value::Group.new(values: values)
123
+ Node::Attribute::Value::Group.new(values:)
124
124
  end
125
125
 
126
126
  def parse_attribute_value
@@ -153,7 +153,7 @@ module Mutant
153
153
  type = token.value.to_sym
154
154
 
155
155
  Structure::ALL.fetch(type) do
156
- error(token: token, message: "Expected valid node type got: #{type}")
156
+ error(token:, message: "Expected valid node type got: #{type}")
157
157
  end
158
158
  end
159
159
 
@@ -169,7 +169,7 @@ module Mutant
169
169
  token
170
170
  else
171
171
  error(
172
- token: token,
172
+ token:,
173
173
  message: "Expected token type: #{type} but got: #{token.type}"
174
174
  )
175
175
  end
@@ -98,7 +98,7 @@ module Mutant
98
98
 
99
99
  def self.fixed(values)
100
100
  values.each_with_index.map do |(klass, name), index|
101
- klass.new(index: index, name: name)
101
+ klass.new(index:, name:)
102
102
  end
103
103
  end
104
104
 
data/lib/mutant/ast.rb CHANGED
@@ -13,7 +13,7 @@ module Mutant
13
13
 
14
14
  def on_line(line)
15
15
  line_map.fetch(line, EMPTY_HASH).map do |node, stack|
16
- View.new(node: node, stack: stack)
16
+ View.new(node:, stack:)
17
17
  end
18
18
  end
19
19
 
@@ -38,7 +38,7 @@ module Mutant
38
38
  .with(matchable_scopes: matchable_scopes(env))
39
39
 
40
40
  matched_subjects = env.record(:subject_match) do
41
- Matcher.expand(env: env).call(env)
41
+ Matcher.expand(env:).call(env)
42
42
  end
43
43
 
44
44
  selected_subjects = subject_select(env, matched_subjects)
@@ -48,9 +48,9 @@ module Mutant
48
48
  end
49
49
 
50
50
  setup_integration(
51
- env: env,
52
- mutations: mutations,
53
- selected_subjects: selected_subjects
51
+ env:,
52
+ mutations:,
53
+ selected_subjects:
54
54
  )
55
55
  end
56
56
  end
@@ -79,9 +79,9 @@ module Mutant
79
79
  hooks.run(:setup_integration_pre)
80
80
  Integration.setup(env).fmap do |integration|
81
81
  env.with(
82
- integration: integration,
83
- mutations: mutations,
84
- selector: Selector::Expression.new(integration: integration),
82
+ integration:,
83
+ mutations:,
84
+ selector: Selector::Expression.new(integration:),
85
85
  subjects: selected_subjects
86
86
  )
87
87
  end.tap { hooks.run(:setup_integration_post) }
@@ -120,7 +120,7 @@ module Mutant
120
120
  config, hooks, world = env.config, env.hooks, env.world
121
121
 
122
122
  env.record(:hooks_env_infection_pre) do
123
- hooks.run(:env_infection_pre, env: env)
123
+ hooks.run(:env_infection_pre, env:)
124
124
  end
125
125
 
126
126
  env.record(:require_target) do
@@ -133,7 +133,7 @@ module Mutant
133
133
  end
134
134
 
135
135
  env.record(:hooks_env_infection_post) do
136
- hooks.run(:env_infection_post, env: env)
136
+ hooks.run(:env_infection_post, env:)
137
137
  end
138
138
  end
139
139
  end
@@ -147,7 +147,7 @@ module Mutant
147
147
 
148
148
  scopes = env.world.object_space.each_object(Module).with_object([]) do |raw_scope, aggregate|
149
149
  expression = expression(config.reporter, config.expression_parser, raw_scope) || next
150
- aggregate << Scope.new(raw: raw_scope, expression: expression)
150
+ aggregate << Scope.new(raw: raw_scope, expression:)
151
151
  end
152
152
 
153
153
  scopes.sort_by { |scope| scope.expression.syntax }
@@ -177,9 +177,9 @@ module Mutant
177
177
  semantics_warning(
178
178
  reporter,
179
179
  CLASS_NAME_TYPE_MISMATCH_FORMAT,
180
- name: name,
180
+ name:,
181
181
  scope_class: raw_scope.class,
182
- raw_scope: raw_scope
182
+ raw_scope:
183
183
  )
184
184
  return
185
185
  end
@@ -19,8 +19,8 @@ module Mutant
19
19
  env = Env.empty(world, @config)
20
20
 
21
21
  env
22
- .record(:config) { Config.load(cli_config: @config, world: world) }
23
- .bind { |config| Bootstrap.call_test(env.with(config: config)) }
22
+ .record(:config) { Config.load(cli_config: @config, world:) }
23
+ .bind { |config| Bootstrap.call_test(env.with(config:)) }
24
24
  end
25
25
 
26
26
  class List < self
@@ -20,8 +20,8 @@ module Mutant
20
20
 
21
21
  private
22
22
 
23
- def initialize(attributes)
24
- super(attributes)
23
+ def initialize(_attributes)
24
+ super
25
25
  @config = Config::DEFAULT.with(
26
26
  coverage_criteria: Config::CoverageCriteria::EMPTY
27
27
  )
@@ -31,8 +31,8 @@ module Mutant
31
31
  env = Env.empty(world, @config)
32
32
 
33
33
  env
34
- .record(:config) { Config.load(cli_config: @config, world: world) }
35
- .bind { |config| Bootstrap.call(env.with(config: config)) }
34
+ .record(:config) { Config.load(cli_config: @config, world:) }
35
+ .bind { |config| Bootstrap.call(env.with(config:)) }
36
36
  end
37
37
 
38
38
  def parse_remaining_arguments(arguments)
@@ -60,7 +60,7 @@ module Mutant
60
60
  end
61
61
 
62
62
  def effective_options
63
- instance_of?(Environment) ? EMPTY_ARRAY : super()
63
+ instance_of?(Environment) ? EMPTY_ARRAY : super
64
64
  end
65
65
 
66
66
  # rubocop:disable Metrics/MethodLength
@@ -99,7 +99,7 @@ module Mutant
99
99
  end
100
100
 
101
101
  def assign_integration_name(name)
102
- set(integration: @config.integration.with(name: name))
102
+ set(integration: @config.integration.with(name:))
103
103
  end
104
104
 
105
105
  def add_matcher_options(parser)
@@ -112,7 +112,7 @@ module Mutant
112
112
  add_matcher(:start_expressions, @config.expression_parser.call(pattern).from_right)
113
113
  end
114
114
  parser.on('--since REVISION', 'Only select subjects touched since REVISION') do |revision|
115
- add_matcher(:diffs, Repository::Diff.new(to: revision, world: world))
115
+ add_matcher(:diffs, Repository::Diff.new(to: revision, world:))
116
116
  end
117
117
  end
118
118
 
@@ -149,7 +149,7 @@ module Mutant
149
149
  '--usage USAGE_TYPE',
150
150
  Usage,
151
151
  'License usage: opensource|commercial'
152
- ) { |usage| set(usage: usage) }
152
+ ) { |usage| set(usage:) }
153
153
  end
154
154
  end # Run
155
155
  # rubocop:enable Metrics/ClassLength
@@ -62,7 +62,7 @@ module Mutant
62
62
 
63
63
  def add_target_options(parser)
64
64
  parser.on('-e', '--evaluate SOURCE') do |source|
65
- @targets << Target::Source.new(source: source)
65
+ @targets << Target::Source.new(source:)
66
66
  end
67
67
 
68
68
  parser.on('-i', '--ignore-pattern AST_PATTERN') do |pattern|
@@ -97,7 +97,7 @@ module Mutant
97
97
  end
98
98
 
99
99
  def read_file(pathname)
100
- Either::Right.new(Target::File.new(pathname: pathname, source: pathname.read))
100
+ Either::Right.new(Target::File.new(pathname:, source: pathname.read))
101
101
  rescue StandardError => exception
102
102
  Either::Left.new("Cannot read file: #{exception}")
103
103
  end
@@ -30,10 +30,10 @@ module Mutant
30
30
  def self.parse(arguments:, parent_names: nil, print_profile: false, world:, zombie: false)
31
31
  new(
32
32
  main: nil,
33
- parent_names: parent_names,
34
- print_profile: print_profile,
35
- world: world,
36
- zombie: zombie
33
+ parent_names:,
34
+ print_profile:,
35
+ world:,
36
+ zombie:
37
37
  ).__send__(:parse, arguments)
38
38
  end
39
39
  # rubocop:enable Metrics/ParameterLists
@@ -184,11 +184,11 @@ module Mutant
184
184
  else
185
185
  find_command(command_name).bind do |command|
186
186
  command.parse(
187
- arguments: arguments,
187
+ arguments:,
188
188
  parent_names: [*parent_names, self.class::NAME],
189
- print_profile: print_profile,
190
- world: world,
191
- zombie: zombie
189
+ print_profile:,
190
+ world:,
191
+ zombie:
192
192
  )
193
193
  end
194
194
  end
data/lib/mutant/cli.rb CHANGED
@@ -7,7 +7,7 @@ module Mutant
7
7
  #
8
8
  # @return [Command]
9
9
  def self.parse(arguments:, world:)
10
- Command::Root.parse(arguments: arguments, world: world)
10
+ Command::Root.parse(arguments:, world:)
11
11
  end
12
12
  end # CLI
13
13
  end # Mutant
data/lib/mutant/config.rb CHANGED
@@ -97,7 +97,7 @@ module Mutant
97
97
 
98
98
  # Load the configuration
99
99
  def self.load(cli_config:, world:)
100
- load_config_file(reporter: cli_config.reporter, world: world).fmap do |file_config|
100
+ load_config_file(reporter: cli_config.reporter, world:).fmap do |file_config|
101
101
  DEFAULT.with(
102
102
  jobs: Etc.nprocessors,
103
103
  mutation: Mutation::Config::DEFAULT
@@ -117,7 +117,7 @@ module Mutant
117
117
  in []
118
118
  Either::Right.new(DEFAULT)
119
119
  in [file]
120
- load_contents(reporter: reporter, path: file).fmap(&DEFAULT.public_method(:with))
120
+ load_contents(reporter:, path: file).fmap(&DEFAULT.public_method(:with))
121
121
  else
122
122
  Either::Left.new(MORE_THAN_ONE_CONFIG_FILE % files.join(', '))
123
123
  end
data/lib/mutant/env.rb CHANGED
@@ -30,19 +30,19 @@ module Mutant
30
30
  # rubocop:disable Metrics/MethodLength
31
31
  def self.empty(world, config)
32
32
  new(
33
- config: config,
33
+ config:,
34
34
  hooks: Hooks.empty,
35
35
  integration: Integration::Null.new(
36
36
  arguments: EMPTY_ARRAY,
37
37
  expression_parser: config.expression_parser,
38
- world: world
38
+ world:
39
39
  ),
40
40
  matchable_scopes: EMPTY_ARRAY,
41
41
  mutations: EMPTY_ARRAY,
42
42
  parser: Parser.new,
43
43
  selector: Selector::Null.new,
44
44
  subjects: EMPTY_ARRAY,
45
- world: world
45
+ world:
46
46
  )
47
47
  end
48
48
  # rubocop:enable Metrics/MethodLength
@@ -61,7 +61,7 @@ module Mutant
61
61
 
62
62
  Result::MutationIndex.new(
63
63
  isolation_result: run_mutation_tests(mutation, tests),
64
- mutation_index: mutation_index,
64
+ mutation_index:,
65
65
  runtime: timer.now - start
66
66
  )
67
67
  end
@@ -71,11 +71,11 @@ module Mutant
71
71
  end
72
72
 
73
73
  def emit_mutation_worker_process_start(index:)
74
- hooks.run(:mutation_worker_process_start, index: index)
74
+ hooks.run(:mutation_worker_process_start, index:)
75
75
  end
76
76
 
77
77
  def emit_test_worker_process_start(index:)
78
- hooks.run(:test_worker_process_start, index: index)
78
+ hooks.run(:test_worker_process_start, index:)
79
79
  end
80
80
 
81
81
  # The test selections
@@ -161,17 +161,17 @@ module Mutant
161
161
  # @param [Symbol] name
162
162
  #
163
163
  # @return [self]
164
- def record(name, &block)
165
- world.record(name, &block)
164
+ def record(name, &)
165
+ world.record(name, &)
166
166
  end
167
167
 
168
168
  private
169
169
 
170
170
  def run_mutation_tests(mutation, tests)
171
171
  config.isolation.call(config.mutation.timeout) do
172
- hooks.run(:mutation_insert_pre, mutation: mutation)
172
+ hooks.run(:mutation_insert_pre, mutation:)
173
173
  result = mutation.insert(world.kernel)
174
- hooks.run(:mutation_insert_post, mutation: mutation)
174
+ hooks.run(:mutation_insert_post, mutation:)
175
175
 
176
176
  result.either(
177
177
  ->(_) { Result::Test::VoidValue.instance },
@@ -13,7 +13,7 @@ module Mutant
13
13
 
14
14
  # rubocop:disable Lint/UnusedMethodArgument
15
15
  def matcher(env:)
16
- Matcher::Descendants.new(const_name: const_name)
16
+ Matcher::Descendants.new(const_name:)
17
17
  end
18
18
  end # Descendants
19
19
  end # Expression
@@ -43,7 +43,7 @@ module Mutant
43
43
  # rubocop:disable Lint/UnusedMethodArgument
44
44
  def matcher(env:)
45
45
  matcher_candidates = MATCHERS.fetch(scope_symbol)
46
- .map { |submatcher| submatcher.new(scope: scope) }
46
+ .map { |submatcher| submatcher.new(scope:) }
47
47
 
48
48
  methods_matcher = Matcher::Chain.new(matchers: matcher_candidates)
49
49
 
@@ -82,7 +82,7 @@ module Mutant
82
82
  def scope
83
83
  Scope.new(
84
84
  raw: Object.const_get(scope_name),
85
- expression: Namespace::Exact.new(scope_name: scope_name)
85
+ expression: Namespace::Exact.new(scope_name:)
86
86
  )
87
87
  end
88
88
 
@@ -38,7 +38,7 @@ module Mutant
38
38
  # rubocop:disable Lint/UnusedMethodArgument
39
39
  def matcher(env:)
40
40
  matcher_candidates = MATCHERS.fetch(scope_symbol)
41
- .map { |submatcher| submatcher.new(scope: scope) }
41
+ .map { |submatcher| submatcher.new(scope:) }
42
42
 
43
43
  Matcher::Chain.new(matchers: matcher_candidates)
44
44
  end
@@ -60,7 +60,7 @@ module Mutant
60
60
 
61
61
  def scope
62
62
  Scope.new(
63
- expression: Namespace::Exact.new(scope_name: scope_name),
63
+ expression: Namespace::Exact.new(scope_name:),
64
64
  raw: Object.const_get(scope_name)
65
65
  )
66
66
  end
@@ -12,14 +12,14 @@ module Mutant
12
12
  end
13
13
 
14
14
  def matcher(env:)
15
- Matcher::Chain.new(matchers: find_matchers(env: env))
15
+ Matcher::Chain.new(matchers: find_matchers(env:))
16
16
  end
17
17
 
18
18
  private
19
19
 
20
20
  def find_matchers(env:)
21
- scope_names(env: env).uniq.map do |scope_name|
22
- Namespace::Recursive.new(scope_name: scope_name).matcher(env: nil)
21
+ scope_names(env:).uniq.map do |scope_name|
22
+ Namespace::Recursive.new(scope_name:).matcher(env: nil)
23
23
  end
24
24
  end
25
25
 
@@ -86,7 +86,7 @@ module Mutant
86
86
  end.lmap do |exception|
87
87
  LOAD_MESSAGE % {
88
88
  exception: exception.inspect,
89
- integration_name: integration_name
89
+ integration_name:
90
90
  }
91
91
  end
92
92
  end
@@ -101,7 +101,7 @@ module Mutant
101
101
  CONST_MESSAGE % {
102
102
  constant_name: "#{self}::#{constant_name}",
103
103
  exception: exception.inspect,
104
- integration_name: integration_name
104
+ integration_name:
105
105
  }
106
106
  end
107
107
  end
@@ -43,7 +43,7 @@ module Mutant
43
43
  # @return [undefined]
44
44
  def self.with(io)
45
45
  io.pipe(binmode: true) do |(reader, writer)|
46
- yield new(reader: reader, writer: writer)
46
+ yield new(reader:, writer:)
47
47
  end
48
48
  end
49
49
 
@@ -236,11 +236,11 @@ module Mutant
236
236
  Pipe.with(io) do |result|
237
237
  Pipe.with(io) do |log|
238
238
  Parent.call(
239
- block: block,
240
- deadline: deadline,
239
+ block:,
240
+ deadline:,
241
241
  log_pipe: log,
242
242
  result_pipe: result,
243
- world: world
243
+ world:
244
244
  )
245
245
  end
246
246
  end
@@ -22,11 +22,11 @@ module Mutant
22
22
  end
23
23
 
24
24
  Result.new(
25
- exception: exception,
25
+ exception:,
26
26
  log: '',
27
27
  process_status: nil,
28
28
  timeout: nil,
29
- value: value
29
+ value:
30
30
  )
31
31
  end
32
32
  # rubocop:enable Lint/SuppressedException
@@ -10,7 +10,7 @@ module Mutant
10
10
  const = env.world.try_const_get(const_name) or return EMPTY_ARRAY
11
11
 
12
12
  Chain.new(
13
- matchers: matched_scopes(env, const).map { |scope| Scope.new(scope: scope) }
13
+ matchers: matched_scopes(env, const).map { |scope| Scope.new(scope:) }
14
14
  ).call(env)
15
15
  end
16
16
 
@@ -23,9 +23,9 @@ module Mutant
23
23
  end
24
24
 
25
25
  super(
26
- evaluator: evaluator,
27
- scope: scope,
28
- target_method: target_method
26
+ evaluator:,
27
+ scope:,
28
+ target_method:
29
29
  )
30
30
  end
31
31
  # rubocop:enable Metrics/MethodLength
@@ -13,7 +13,7 @@ module Mutant
13
13
  #
14
14
  # @return [Matcher::Method::Singleton]
15
15
  def self.new(scope:, target_method:)
16
- super(scope: scope, target_method: target_method, evaluator: Evaluator)
16
+ super(scope:, target_method:, evaluator: Evaluator)
17
17
  end
18
18
 
19
19
  # Metaclass method evaluator
@@ -40,7 +40,7 @@ module Mutant
40
40
  end
41
41
 
42
42
  def metaclass_containing(node)
43
- AST::FindMetaclassContaining.call(ast: ast, target: node)
43
+ AST::FindMetaclassContaining.call(ast:, target: node)
44
44
  end
45
45
 
46
46
  def name?(node)
@@ -10,7 +10,7 @@ module Mutant
10
10
  #
11
11
  # @return [Matcher::Method::Singleton]
12
12
  def self.new(scope:, target_method:)
13
- super(scope: scope, target_method: target_method, evaluator: Evaluator)
13
+ super(scope:, target_method:, evaluator: Evaluator)
14
14
  end
15
15
 
16
16
  # Singleton method evaluator