henitai 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +19 -0
  3. data/LICENSE +21 -0
  4. data/README.md +182 -0
  5. data/assets/schema/henitai.schema.json +123 -0
  6. data/exe/henitai +6 -0
  7. data/lib/henitai/arid_node_filter.rb +97 -0
  8. data/lib/henitai/cli.rb +341 -0
  9. data/lib/henitai/configuration.rb +132 -0
  10. data/lib/henitai/configuration_validator.rb +293 -0
  11. data/lib/henitai/coverage_bootstrapper.rb +75 -0
  12. data/lib/henitai/coverage_formatter.rb +112 -0
  13. data/lib/henitai/equivalence_detector.rb +85 -0
  14. data/lib/henitai/execution_engine.rb +174 -0
  15. data/lib/henitai/git_diff_analyzer.rb +82 -0
  16. data/lib/henitai/integration.rb +417 -0
  17. data/lib/henitai/mutant/activator.rb +234 -0
  18. data/lib/henitai/mutant.rb +68 -0
  19. data/lib/henitai/mutant_generator.rb +158 -0
  20. data/lib/henitai/mutant_history_store.rb +279 -0
  21. data/lib/henitai/operator.rb +96 -0
  22. data/lib/henitai/operators/arithmetic_operator.rb +46 -0
  23. data/lib/henitai/operators/array_declaration.rb +52 -0
  24. data/lib/henitai/operators/assignment_expression.rb +78 -0
  25. data/lib/henitai/operators/block_statement.rb +31 -0
  26. data/lib/henitai/operators/boolean_literal.rb +70 -0
  27. data/lib/henitai/operators/conditional_expression.rb +184 -0
  28. data/lib/henitai/operators/equality_operator.rb +41 -0
  29. data/lib/henitai/operators/hash_literal.rb +66 -0
  30. data/lib/henitai/operators/logical_operator.rb +84 -0
  31. data/lib/henitai/operators/method_expression.rb +56 -0
  32. data/lib/henitai/operators/pattern_match.rb +66 -0
  33. data/lib/henitai/operators/range_literal.rb +40 -0
  34. data/lib/henitai/operators/return_value.rb +105 -0
  35. data/lib/henitai/operators/safe_navigation.rb +34 -0
  36. data/lib/henitai/operators/string_literal.rb +64 -0
  37. data/lib/henitai/operators.rb +25 -0
  38. data/lib/henitai/parser_current.rb +7 -0
  39. data/lib/henitai/reporter.rb +432 -0
  40. data/lib/henitai/result.rb +170 -0
  41. data/lib/henitai/runner.rb +183 -0
  42. data/lib/henitai/sampling_strategy.rb +33 -0
  43. data/lib/henitai/scenario_execution_result.rb +71 -0
  44. data/lib/henitai/source_parser.rb +41 -0
  45. data/lib/henitai/static_filter.rb +186 -0
  46. data/lib/henitai/stillborn_filter.rb +34 -0
  47. data/lib/henitai/subject.rb +71 -0
  48. data/lib/henitai/subject_resolver.rb +232 -0
  49. data/lib/henitai/syntax_validator.rb +16 -0
  50. data/lib/henitai/test_prioritizer.rb +55 -0
  51. data/lib/henitai/unparse_helper.rb +24 -0
  52. data/lib/henitai/version.rb +5 -0
  53. data/lib/henitai/warning_silencer.rb +16 -0
  54. data/lib/henitai.rb +51 -0
  55. data/sig/configuration_validator.rbs +29 -0
  56. data/sig/henitai.rbs +594 -0
  57. data/sig/unparser.rbs +3 -0
  58. metadata +153 -0
data/sig/henitai.rbs ADDED
@@ -0,0 +1,594 @@
1
+ module ::FileUtils
2
+ def self.mkdir_p: (String) -> Array[String]
3
+ end
4
+
5
+ module ::JSON
6
+ def self.generate: (untyped) -> String
7
+ def self.pretty_generate: (untyped) -> String
8
+ end
9
+
10
+ module ::Net
11
+ class HTTP
12
+ def self.start: (String, Integer, use_ssl: bool) { (HTTP) -> untyped } -> untyped
13
+ def request: (untyped) -> untyped
14
+ def open_timeout=: (Integer) -> Integer
15
+ def read_timeout=: (Integer) -> Integer
16
+
17
+ class Put
18
+ def initialize: (String, Hash[String, String]) -> void
19
+ attr_accessor body: String
20
+ end
21
+ end
22
+ end
23
+
24
+ module ::URI
25
+ class InvalidURIError < StandardError
26
+ end
27
+
28
+ def self.parse: (String) -> untyped
29
+ def self.encode_www_form_component: (String) -> String
30
+ end
31
+
32
+ module ::Open3
33
+ def self.capture2: (*String) -> [String, Process::Status]
34
+ end
35
+
36
+ module ::Coverage
37
+ def self.peek_result: () -> untyped
38
+ end
39
+
40
+ module ::Minitest
41
+ def self.run: (Array[String]) -> bool
42
+ end
43
+
44
+ module ::RSpec::Core::Formatters
45
+ def self.register: (untyped, *untyped) -> void
46
+ end
47
+
48
+ module Henitai
49
+ HISTORY_STORE_FILENAME: String
50
+ VERSION: String
51
+
52
+ class ConfigurationError < StandardError
53
+ end
54
+
55
+ class SubjectNotFound < StandardError
56
+ end
57
+
58
+ class CoverageError < StandardError
59
+ end
60
+
61
+ class GitDiffError < StandardError
62
+ end
63
+
64
+ module Operators
65
+ end
66
+
67
+ class Configuration
68
+ DEFAULT_TIMEOUT: Float
69
+ DEFAULT_OPERATORS: Symbol
70
+ DEFAULT_JOBS: untyped
71
+ DEFAULT_MAX_MUTANTS_PER_LINE: Integer
72
+ DEFAULT_MAX_FLAKY_RETRIES: Integer
73
+ DEFAULT_REPORTS_DIR: String
74
+ DEFAULT_COVERAGE_CRITERIA: Hash[Symbol, bool]
75
+ DEFAULT_THRESHOLDS: Hash[Symbol, Integer]
76
+ CONFIG_FILE: String
77
+
78
+ attr_reader integration: untyped
79
+ attr_reader includes: Array[String]
80
+ attr_reader operators: Symbol
81
+ attr_reader timeout: Float
82
+ attr_reader ignore_patterns: Array[untyped]
83
+ attr_reader max_mutants_per_line: Integer
84
+ attr_reader max_flaky_retries: Integer
85
+ attr_reader sampling: untyped
86
+ attr_reader jobs: untyped
87
+ attr_reader coverage_criteria: Hash[Symbol, untyped]
88
+ attr_reader thresholds: Hash[Symbol, Integer]
89
+ attr_reader reporters: Array[String]
90
+ attr_reader reports_dir: String
91
+ attr_reader dashboard: Hash[Symbol, untyped]
92
+ attr_reader all_logs: bool
93
+
94
+ def self.load: (?path: String, ?overrides: Hash[Symbol, untyped]) -> Configuration
95
+ def initialize: (?path: String, ?overrides: Hash[Symbol, untyped]) -> void
96
+
97
+ private
98
+
99
+ def load_raw_configuration: (String) -> Hash[Symbol, untyped]
100
+ def apply_defaults: (Hash[Symbol, untyped]) -> void
101
+ def apply_general_defaults: (Hash[Symbol, untyped]) -> void
102
+ def apply_mutation_defaults: (Hash[Symbol, untyped]) -> void
103
+ def apply_analysis_defaults: (Hash[Symbol, untyped]) -> void
104
+ def merge_defaults: (Hash[Symbol, untyped], Hash[Symbol, untyped]?) -> Hash[Symbol, untyped]
105
+ def symbolize_keys: (untyped) -> untyped
106
+ end
107
+
108
+ class ScenarioExecutionResult
109
+ attr_reader status: Symbol
110
+ attr_reader stdout: String
111
+ attr_reader stderr: String
112
+ attr_reader exit_status: Integer?
113
+ attr_reader log_path: String
114
+
115
+ def initialize: (status: Symbol, stdout: String?, stderr: String?, log_path: String, ?exit_status: Integer?) -> void
116
+ def survived?: () -> bool
117
+ def killed?: () -> bool
118
+ def timeout?: () -> bool
119
+ def log_text: () -> String
120
+ def combined_output: () -> String
121
+ def tail: (?Integer) -> String
122
+ def should_show_logs?: (?all_logs: bool) -> bool
123
+ def failure_tail: (?all_logs: bool, ?lines: Integer) -> String
124
+ end
125
+
126
+ class Subject
127
+ attr_reader namespace: String?
128
+ attr_reader method_name: String?
129
+ attr_reader method_type: Symbol
130
+ attr_reader source_file: String?
131
+ attr_reader source_range: Range[Integer]?
132
+
133
+ def self.parse: (String) -> Subject
134
+ def initialize: (?expression: String, ?namespace: String, ?method_name: String, ?method_type: Symbol, ?source_location: Hash[Symbol, untyped], ?ast_node: untyped) -> void
135
+ def expression: () -> String
136
+ def wildcard?: () -> bool
137
+
138
+ private
139
+
140
+ def parse_expression: (String) -> void
141
+ end
142
+
143
+ class Mutant
144
+ STATUSES: Array[Symbol]
145
+
146
+ attr_reader id: String
147
+ attr_reader subject: Subject
148
+ attr_reader operator: String
149
+ attr_reader original_node: untyped
150
+ attr_reader mutated_node: untyped
151
+ attr_reader mutation_type: untyped
152
+ attr_reader description: String
153
+ attr_reader location: Hash[Symbol, untyped]
154
+ attr_accessor status: Symbol
155
+ attr_accessor killing_test: String?
156
+ attr_accessor duration: Float?
157
+
158
+ def initialize: (subject: Subject, operator: String, nodes: Hash[Symbol, untyped], description: String, location: Hash[Symbol, untyped]) -> void
159
+ def killed?: () -> bool
160
+ def survived?: () -> bool
161
+ def pending?: () -> bool
162
+ def ignored?: () -> bool
163
+ def equivalent?: () -> bool
164
+ def to_s: () -> String
165
+ end
166
+
167
+ class SyntaxValidator
168
+ def initialize: () -> void
169
+ def valid?: (Mutant) -> bool
170
+ end
171
+
172
+ class CoverageFormatter
173
+ REPORT_DIR_ENV: String
174
+ REPORT_FILE_NAME: String
175
+
176
+ def initialize: (untyped) -> void
177
+ def example_finished: (untyped) -> void
178
+ def dump_summary: (untyped) -> void
179
+
180
+ private
181
+
182
+ def report_path: () -> String
183
+ def reports_dir: () -> String
184
+ def current_snapshot: () -> untyped
185
+ def new_lines: (untyped) -> untyped
186
+ def new_line_numbers: (untyped, untyped) -> untyped
187
+ def previous_line_counts: (String) -> untyped
188
+ def line_counts_for: (untyped) -> Array[untyped]
189
+ def source_file?: (String) -> bool
190
+ def serializable_report: () -> untyped
191
+ end
192
+
193
+ class SamplingStrategy
194
+ def initialize: () -> void
195
+ def sample: (Array[Mutant], ratio: Float, ?strategy: Symbol) -> Array[Mutant]
196
+ end
197
+
198
+ class TestPrioritizer
199
+ def initialize: () -> void
200
+ def sort: (Array[String], untyped, Hash[untyped, untyped]) -> Array[String]
201
+ end
202
+
203
+ class Operator
204
+ LIGHT_SET: Array[String]
205
+ FULL_SET: Array[String]
206
+
207
+ def self.for_set: (Symbol) -> Array[untyped]
208
+ def self.node_types: () -> Array[Symbol]
209
+ def mutate: (untyped, subject: Subject) -> Array[Mutant]
210
+ def name: () -> String
211
+
212
+ private
213
+
214
+ def build_mutant: (subject: Subject, original_node: untyped, mutated_node: untyped, description: String) -> Mutant
215
+ def node_location: (untyped) -> Hash[Symbol, untyped]
216
+ end
217
+
218
+ module Integration
219
+ def self.for: (String) -> untyped
220
+
221
+ class Base
222
+ def select_tests: (Subject) -> Array[String]
223
+ def test_files: () -> Array[String]
224
+ def run_mutant: (mutant: Mutant, test_files: Array[String], timeout: Float) -> ScenarioExecutionResult
225
+ def run_suite: (Array[String], ?timeout: Float) -> ScenarioExecutionResult
226
+ end
227
+
228
+ class ScenarioLogSupport
229
+ def capture_child_output: (Hash[Symbol, String]) { () -> untyped } -> untyped
230
+ def with_coverage_dir: (String) { () -> untyped } -> untyped
231
+
232
+ private
233
+
234
+ def open_child_output: (Hash[Symbol, String]) -> Hash[Symbol, untyped]
235
+ def close_child_output: (Hash[Symbol, untyped]?) -> void
236
+ def build_child_output_files: (Hash[Symbol, String]) -> Hash[Symbol, untyped]
237
+ def sync_child_output_files: (Hash[Symbol, untyped]) -> void
238
+ def redirect_child_output: (Hash[Symbol, untyped]) -> void
239
+ def restore_child_output: (Hash[Symbol, untyped]) -> void
240
+ def reopen_child_output_stream: (untyped, untyped) -> void
241
+ def close_child_output_files: (Hash[Symbol, untyped]) -> void
242
+ def mutation_coverage_dir: (String) -> String
243
+ end
244
+
245
+ class Rspec < Base
246
+ REQUIRE_DIRECTIVE_PATTERN: Regexp
247
+ DEFAULT_SUITE_TIMEOUT: Float
248
+
249
+ def select_tests: (Subject) -> Array[String]
250
+ def test_files: () -> Array[String]
251
+ def run_mutant: (mutant: Mutant, test_files: Array[String], timeout: Float) -> ScenarioExecutionResult
252
+ def run_suite: (Array[String], ?timeout: Float) -> ScenarioExecutionResult
253
+
254
+ private
255
+
256
+ def run_in_child: (mutant: Mutant, test_files: Array[String], log_paths: Hash[Symbol, String]) -> Integer
257
+ def suite_command: (Array[String]) -> Array[String]
258
+ def wait_with_timeout: (Integer, Float) -> untyped
259
+ def handle_timeout: (Integer) -> Symbol
260
+ def build_result: (untyped, Hash[Symbol, String]) -> ScenarioExecutionResult
261
+ def scenario_status: (untyped) -> Symbol
262
+ def exit_status_for: (untyped) -> Integer?
263
+ def read_log_file: (String) -> String
264
+ def write_combined_log: (String, String, String) -> void
265
+ def combined_log: (String, String) -> String
266
+ def scenario_log_paths: (String) -> Hash[Symbol, String]
267
+ def run_tests: (Array[String]) -> Integer
268
+ def pause: (Float) -> void
269
+ def scenario_log_support: () -> ScenarioLogSupport
270
+ def rspec_options: () -> Array[String]
271
+ def spec_files: () -> Array[String]
272
+ def fallback_spec_files: (Subject) -> Array[String]
273
+ def selection_patterns: (Subject) -> Array[String]
274
+ def requires_source_file?: (String, String) -> bool
275
+ def requires_source_file_transitively?: (String, String, ?Array[String]) -> bool
276
+ def required_files: (String) -> Array[String]
277
+ def resolve_required_file: (String, String, String) -> String?
278
+ def relative_candidates: (String, String) -> Array[String]
279
+ def require_candidates: (String, String) -> Array[String]
280
+ def expand_candidates: (String, String) -> Array[String]
281
+ def reap_child: (Integer) -> void
282
+ end
283
+
284
+ class Minitest < Rspec
285
+ private
286
+
287
+ def run_tests: (Array[String]) -> Integer
288
+ def spec_files: () -> Array[String]
289
+ end
290
+ end
291
+
292
+ class SubjectResolver
293
+ def resolve_from_files: (Array[String]?) -> Array[Subject]
294
+ def apply_pattern: (Array[Subject], String) -> Array[Subject]
295
+ end
296
+
297
+ class GitDiffAnalyzer
298
+ def changed_files: (from: String, to: String, ?dir: String) -> Array[String]
299
+ end
300
+
301
+ class MutantGenerator
302
+ def generate: (Array[Subject], Array[untyped], ?config: untyped) -> Array[Mutant]
303
+ end
304
+
305
+ class MutantHistoryStore
306
+ def initialize: (path: String) -> void
307
+ def record: (Result, version: String, ?recorded_at: Time) -> void
308
+ def trend_report: () -> Hash[Symbol, untyped]
309
+ end
310
+
311
+ class EquivalenceDetector
312
+ def initialize: () -> void
313
+ def analyze: (Mutant) -> Mutant
314
+
315
+ private
316
+
317
+ def equivalent_arithmetic_mutation?: (Mutant) -> bool
318
+ def binary_send?: (untyped) -> bool
319
+ def same_receiver?: (untyped, untyped) -> bool
320
+ def additive_equivalent?: (untyped, untyped) -> bool
321
+ def multiplicative_equivalent?: (untyped, untyped) -> bool
322
+ def additive_operator?: (untyped) -> bool
323
+ def multiplicative_operator?: (untyped) -> bool
324
+ def zero_operand?: (untyped) -> bool
325
+ def one_operand?: (untyped) -> bool
326
+ def numeric_operand?: (untyped, untyped) -> bool
327
+ def same_node?: (untyped, untyped) -> bool
328
+ end
329
+
330
+ module UnparseHelper
331
+ private
332
+
333
+ def safe_unparse: (untyped) -> String
334
+ def fallback_source: (untyped) -> String
335
+ end
336
+
337
+ class StaticFilter
338
+ def apply: (Array[Mutant], untyped) -> Array[Mutant]
339
+ def coverage_lines_for: (untyped) -> Hash[String, Array[Integer]]
340
+ def coverage_lines_by_file: (?String) -> Hash[String, Array[Integer]]
341
+ def test_lines_by_file: (?String) -> Hash[String, Hash[String, Array[Integer]]]
342
+ end
343
+
344
+ class ExecutionEngine
345
+ def run: (Array[Mutant], untyped, untyped, ?progress_reporter: untyped) -> Array[Mutant]
346
+
347
+ private
348
+
349
+ def parallel_execution?: (untyped, Array[Mutant]) -> bool
350
+ def worker_count: (untyped) -> Integer
351
+ def run_linear: (Array[Mutant], untyped, untyped, untyped?, untyped) -> void
352
+ def run_parallel: (Array[Mutant], untyped, untyped, untyped?, untyped) -> void
353
+ def process_mutant: (Mutant, untyped, untyped, untyped?, ?untyped) -> void
354
+ def prioritized_tests_for: (Mutant, untyped, untyped) -> Array[String]
355
+ def test_prioritizer: () -> TestPrioritizer
356
+ def test_history: (untyped) -> Hash[untyped, untyped]
357
+ def run_with_flaky_retry: (Mutant, untyped, untyped, Array[String], ?untyped) -> ScenarioExecutionResult
358
+ def warn_flaky_mutants: (Integer) -> void
359
+ def with_reports_dir: (untyped) { () -> untyped } -> untyped
360
+ end
361
+
362
+ class Mutant::Activator
363
+ SERIALIZER_METHODS: Hash[Symbol, Symbol]
364
+
365
+ def self.activate!: (untyped) -> Symbol?
366
+ def initialize: () -> void
367
+ def activate!: (untyped) -> Symbol?
368
+
369
+ private
370
+
371
+ def load_target: (Subject) -> untyped
372
+ def load_source_file: (Subject) -> void
373
+ def target_for: (Subject) -> untyped
374
+ def method_source: (Mutant) -> String
375
+ def body_source: (Mutant) -> String
376
+ def parameter_source: (Mutant) -> String
377
+ def method_arguments: (untyped) -> untyped
378
+ def parameter_fragment: (untyped) -> String?
379
+ def argument_parameter_fragment: (untyped) -> String
380
+ def optional_parameter_fragment: (untyped) -> String
381
+ def rest_parameter_fragment: (untyped) -> String
382
+ def keyword_parameter_fragment: (untyped) -> String
383
+ def optional_keyword_parameter_fragment: (untyped) -> String
384
+ def keyword_rest_parameter_fragment: (untyped) -> String
385
+ def block_parameter_fragment: (untyped) -> String
386
+ def forward_parameter_fragment: (untyped) -> String
387
+ def prefixed_parameter: (untyped, String) -> String
388
+ def replace_node: (untyped, untyped, untyped) -> untyped
389
+ def same_node?: (untyped, untyped) -> bool
390
+ def replace_child: (untyped, untyped, untyped) -> untyped
391
+ def method_body: (untyped) -> untyped
392
+ def source_file_from_ast: (Subject) -> String?
393
+ def node_location_signature: (untyped) -> Array[untyped]?
394
+ def compile_safe_unparse: (untyped) -> String
395
+ end
396
+
397
+ module Reporter
398
+ def self.run_all: (names: Array[String], result: Result, config: Configuration) -> void
399
+ def self.reporter_class: (String) -> untyped
400
+
401
+ class Base
402
+ def initialize: (config: Configuration) -> void
403
+ def report: (Result) -> void
404
+
405
+ private
406
+
407
+ def config: () -> Configuration
408
+ end
409
+
410
+ class Terminal < Base
411
+ include UnparseHelper
412
+
413
+ PROGRESS_GLYPHS: Hash[Symbol, String]
414
+
415
+ def report: (Result) -> void
416
+ def progress: (untyped, ?scenario_result: ScenarioExecutionResult) -> void
417
+
418
+ private
419
+
420
+ def report_lines: (Result) -> Array[String]
421
+ def summary_lines: (Result) -> Array[String]
422
+ def survived_detail_lines: (Result) -> Array[String]
423
+ def survived_mutant_lines: (Mutant) -> Array[String]
424
+ def survived_mutant_header: (Mutant) -> String
425
+ def original_line: (Mutant) -> String
426
+ def mutated_line: (Mutant) -> String
427
+ def score_line: (Result) -> String
428
+ def format_row: (String, untyped) -> String
429
+ def count_status: (Result, Symbol) -> Integer
430
+ def format_duration: (Float) -> String
431
+ def format_percent: (Float?) -> String
432
+ def score_color: (Float?) -> String?
433
+ def colorize: (String, String) -> String
434
+ def should_show_logs?: (ScenarioExecutionResult) -> bool
435
+ def scenario_output: (ScenarioExecutionResult) -> String
436
+ def flush: () -> void
437
+ end
438
+
439
+ class Json < Base
440
+ def report: (Result) -> void
441
+
442
+ private
443
+
444
+ def report_path: () -> String
445
+ def write_history_report: () -> void
446
+ def history_store_path: () -> String
447
+ def history_report_path: () -> String
448
+ end
449
+
450
+ class Html < Base
451
+ def report: (Result) -> void
452
+
453
+ private
454
+
455
+ def report_path: () -> String
456
+ def html_document: (Result) -> String
457
+ def escaped_report_json: (Result) -> String
458
+ end
459
+
460
+ class Dashboard < Base
461
+ DEFAULT_BASE_URL: String
462
+ HTTP_TIMEOUT_SECONDS: Integer
463
+
464
+ def report: (Result) -> void
465
+
466
+ private
467
+
468
+ def ready?: () -> bool
469
+ def build_request: (Result, untyped) -> untyped
470
+ def request_headers: () -> Hash[String, String]
471
+ def send_request: (untyped, untyped) -> untyped
472
+ def dashboard_uri: () -> untyped
473
+ def base_url: () -> String
474
+ def project: () -> String?
475
+ def version: () -> String?
476
+ def env_version: () -> String?
477
+ def ref_without_prefix: (String?) -> String?
478
+ def project_from_git_remote: () -> String?
479
+ def api_key: () -> String?
480
+ def project_path: () -> String
481
+ def encoded_version: () -> String
482
+ def blank?: (String?) -> bool
483
+ def git_remote_url: () -> String?
484
+ def git_branch_name: () -> String?
485
+
486
+ def self.project_from_git_url: (String?) -> String?
487
+ def self.normalize_git_url: (String?) -> String?
488
+ def self.project_from_uri_url: (String) -> String?
489
+ def self.project_from_ssh_url: (String) -> String?
490
+ end
491
+ end
492
+
493
+ class Result
494
+ include UnparseHelper
495
+
496
+ SCHEMA_VERSION: String
497
+
498
+ attr_reader mutants: Array[Mutant]
499
+ attr_reader started_at: Time
500
+ attr_reader finished_at: Time
501
+
502
+ def initialize: (mutants: Array[Mutant], started_at: Time, finished_at: Time) -> void
503
+ def killed: () -> Integer
504
+ def survived: () -> Integer
505
+ def equivalent: () -> Integer
506
+ def detected: () -> Integer
507
+ def mutation_score: () -> Float?
508
+ def mutation_score_indicator: () -> Float?
509
+ def scoring_summary: () -> Hash[Symbol, untyped]
510
+ def duration: () -> Float
511
+ def to_stryker_schema: () -> Hash[Symbol, untyped]
512
+
513
+ private
514
+
515
+ def build_files_section: () -> Hash[Symbol, untyped]
516
+ def mutant_to_schema: (Mutant) -> Hash[Symbol, untyped]
517
+ def replacement_for: (Mutant) -> String
518
+ def location_for: (Mutant) -> Hash[Symbol, untyped]
519
+ def line_column: (Mutant, Symbol) -> Hash[Symbol, Integer]
520
+ def duration_for: (Mutant) -> Integer?
521
+ def equivalence_uncertainty: () -> String?
522
+ def stryker_status: (Symbol) -> String
523
+ end
524
+
525
+ class Runner
526
+ attr_reader config: Configuration
527
+ attr_reader result: untyped
528
+
529
+ def initialize: (?config: Configuration, ?subjects: Array[Subject], ?since: String) -> void
530
+ def run: () -> Result
531
+ def resolve_subjects: (?Array[String]) -> untyped
532
+ def generate_mutants: (untyped) -> untyped
533
+ def filter_mutants: (untyped) -> untyped
534
+ def execute_mutants: (untyped) -> untyped
535
+ def report: (Result) -> void
536
+ def subject_resolver: () -> untyped
537
+ def git_diff_analyzer: () -> untyped
538
+ def mutant_generator: () -> untyped
539
+ def static_filter: () -> untyped
540
+ def execution_engine: () -> untyped
541
+ def coverage_bootstrapper: () -> CoverageBootstrapper
542
+ def integration: () -> untyped
543
+ def operators: () -> untyped
544
+ def progress_reporter: () -> untyped?
545
+ def history_store: () -> untyped
546
+ def history_store_path: () -> String
547
+ def source_files: () -> Array[String]
548
+ def pattern_subjects: () -> Array[Subject]
549
+ def unique_subjects: (Array[Subject]) -> Array[Subject]
550
+ def normalize_path: (String) -> String
551
+
552
+ private
553
+
554
+ def build_result: (Array[Mutant], Time, Time) -> Result
555
+ def persist_history: (Result, Time) -> void
556
+ def bootstrap_coverage: (Array[String]) -> void
557
+ def with_reports_dir: () { () -> untyped } -> untyped
558
+ end
559
+
560
+ class CoverageBootstrapper
561
+ def initialize: (?static_filter: StaticFilter) -> void
562
+ def ensure!: (source_files: Array[String], config: Configuration, integration: Integration::Base) -> void
563
+
564
+ private
565
+
566
+ def static_filter: () -> StaticFilter
567
+ def coverage_available?: (Array[String], Configuration) -> bool
568
+ def bootstrap_coverage: (Integration::Base, Configuration) -> void
569
+ def source_file_paths: (Array[String]) -> Array[String]
570
+ end
571
+
572
+ class CLI
573
+ def self.start: (Array[String]) -> untyped
574
+ def initialize: (Array[String]) -> void
575
+ def run: () -> untyped
576
+ end
577
+ end
578
+
579
+ module Process
580
+ def self.fork: () { () -> untyped } -> Integer
581
+ def self.exit: (Integer?) -> void
582
+ def self.wait: (Integer, ?Integer) -> Integer?
583
+ def self.last_status: () -> untyped
584
+ def self.kill: (Symbol, Integer) -> Integer
585
+ def self.clock_gettime: (Symbol) -> Float
586
+ end
587
+
588
+ module RSpec
589
+ module Core
590
+ class Runner
591
+ def self.run: (Array[String]) -> Integer
592
+ end
593
+ end
594
+ end
data/sig/unparser.rbs ADDED
@@ -0,0 +1,3 @@
1
+ module Unparser
2
+ def self.unparse: (untyped) -> String
3
+ end