-
-
Notifications
You must be signed in to change notification settings - Fork 154
/
schema.json
622 lines (619 loc) · 33.1 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
{
"$schema": "https://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [
"source"
],
"properties": {
"$schema": {
"type": "string"
},
"timeout": {
"type": "number",
"description": "The allowed timeout in seconds.",
"minimum": "0"
},
"source": {
"type": "object",
"required": [
"directories"
],
"additionalProperties": false,
"properties": {
"directories": {
"type": "array",
"minItems": 1,
"description": "Contains all folders with source code you want to mutate.",
"items": {
"type": "string"
},
"uniqueItems": true
},
"excludes": {
"type": "array",
"minItems": 1,
"description": "Contains all folders or files you want to exclude withing your source folders.",
"items": {
"type": "string"
},
"uniqueItems": true
}
}
},
"logs": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"text": {
"type": "string",
"description": "Human readable text log file."
},
"summary": {
"type": "string",
"definition": "Summary log file, which displays the amount of mutants per category, (Killed, Errored, Escaped, Timed Out & Not Covered). More intended for internal purposes."
},
"json": {
"type": "string",
"definition": "JSON log file, which contains information about all mutants, as well as the source and mutated code and test framework output. Useful for using on CI servers to be able to programmatically analyze it."
},
"html": {
"type": "string",
"definition": "HTML report, which displays MSI values as well as mutated files with Killed and Escaped mutants with diffs for them. Human readable report, similar to PHPUnit HTML report."
},
"debug": {
"type": "string",
"description": "Debug log file, which displays what mutations were found on what line, per category. More intended for internal purposes."
},
"perMutator": {
"type": "string",
"description": "Markdown file which will give a break-down of the effectiveness of each mutator."
},
"stryker": {
"oneOf": [
{
"type": "object",
"required": ["badge"],
"description": "Mutation score badge for your GitHub project. If provided, Infection will report results for matching branches to an upstream reporting dashboard.",
"additionalProperties": false,
"properties": {
"badge": { "$ref": "#/definitions/stryker-branch" }
}
},
{
"type": "object",
"required": ["report"],
"description": "Mutation score badge for your GitHub project. If provided, Infection will report results for matching branches to an upstream reporting dashboard.",
"additionalProperties": false,
"properties": {
"report": { "$ref": "#/definitions/stryker-branch" }
}
}
]
},
"github": {
"type": "boolean",
"description": "GitHub Annotations for escaped Mutants in the added/modifies files"
}
}
},
"tmpDir": {
"type": "string",
"description": "Folder where Infection creates its configs, caches and other stuff."
},
"phpUnit": {
"type": "object",
"description": "PHPUnit additional settings.",
"additionalProperties": false,
"properties": {
"configDir": {
"type": "string",
"description": "Path to directory containing PHPUnit configuration file."
},
"customPath": {
"type": "string",
"description": "Custom path to PHPUnit executable."
}
}
},
"ignoreMsiWithNoMutations": {
"type": "boolean",
"description": "Ignore MSI violations with zero mutations."
},
"minMsi": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Minimum Mutation Score Indicator (MSI) percentage value. Should be used in CI server."
},
"minCoveredMsi": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Minimum Covered Code Mutation Score Indicator (MSI) percentage value. Should be used in CI server."
},
"mutators": {
"type": "object",
"additionalProperties": false,
"description": "Contains the settings for different mutations and profiles",
"properties": {
"global-ignore": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"global-ignoreSourceCodeByRegex": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"format": "regex"
}
},
"@arithmetic": { "$ref": "#/definitions/default-mutator-config" },
"@boolean": { "$ref": "#/definitions/default-mutator-config" },
"@conditional_boundary": { "$ref": "#/definitions/default-mutator-config" },
"@conditional_negotiation": { "$ref": "#/definitions/default-mutator-config" },
"@equal": { "$ref": "#/definitions/default-mutator-config" },
"@function_signature": { "$ref": "#/definitions/default-mutator-config" },
"@identical": { "$ref": "#/definitions/default-mutator-config" },
"@number": { "$ref": "#/definitions/default-mutator-config" },
"@operator": { "$ref": "#/definitions/default-mutator-config" },
"@regex": { "$ref": "#/definitions/default-mutator-config" },
"@removal": { "$ref": "#/definitions/default-mutator-config" },
"@return_value": { "$ref": "#/definitions/default-mutator-config" },
"@sort": { "$ref": "#/definitions/default-mutator-config" },
"@loop": { "$ref": "#/definitions/default-mutator-config" },
"@cast": { "$ref": "#/definitions/default-mutator-config" },
"@unwrap": { "$ref": "#/definitions/default-mutator-config" },
"@extensions": { "$ref": "#/definitions/default-mutator-config" },
"@default": { "$ref": "#/definitions/default-mutator-config" },
"Assignment": { "$ref": "#/definitions/default-mutator-config" },
"AssignmentEqual": { "$ref": "#/definitions/default-mutator-config" },
"BitwiseAnd": { "$ref": "#/definitions/default-mutator-config" },
"BitwiseNot": { "$ref": "#/definitions/default-mutator-config" },
"BitwiseOr": { "$ref": "#/definitions/default-mutator-config" },
"BitwiseXor": { "$ref": "#/definitions/default-mutator-config" },
"Decrement": { "$ref": "#/definitions/default-mutator-config" },
"DivEqual": { "$ref": "#/definitions/default-mutator-config" },
"Division": { "$ref": "#/definitions/default-mutator-config" },
"Exponentiation": { "$ref": "#/definitions/default-mutator-config" },
"Increment": { "$ref": "#/definitions/default-mutator-config" },
"Minus": { "$ref": "#/definitions/default-mutator-config" },
"MinusEqual": { "$ref": "#/definitions/default-mutator-config" },
"ModEqual": { "$ref": "#/definitions/default-mutator-config" },
"Modulus": { "$ref": "#/definitions/default-mutator-config" },
"MulEqual": { "$ref": "#/definitions/default-mutator-config" },
"Multiplication": { "$ref": "#/definitions/default-mutator-config" },
"Plus": { "$ref": "#/definitions/default-mutator-config" },
"PlusEqual": { "$ref": "#/definitions/default-mutator-config" },
"PowEqual": { "$ref": "#/definitions/default-mutator-config" },
"ShiftLeft": { "$ref": "#/definitions/default-mutator-config" },
"ShiftRight": { "$ref": "#/definitions/default-mutator-config" },
"RoundingFamily": { "$ref": "#/definitions/default-mutator-config" },
"ArrayItem": { "$ref": "#/definitions/default-mutator-config" },
"EqualIdentical": { "$ref": "#/definitions/default-mutator-config" },
"FalseValue": { "$ref": "#/definitions/default-mutator-config" },
"IdenticalEqual": { "$ref": "#/definitions/default-mutator-config" },
"InstanceOf_": { "$ref": "#/definitions/default-mutator-config" },
"LogicalAnd": { "$ref": "#/definitions/default-mutator-config" },
"LogicalLowerAnd": { "$ref": "#/definitions/default-mutator-config" },
"LogicalLowerOr": { "$ref": "#/definitions/default-mutator-config" },
"LogicalNot": { "$ref": "#/definitions/default-mutator-config" },
"LogicalOr": { "$ref": "#/definitions/default-mutator-config" },
"NotEqualNotIdentical": { "$ref": "#/definitions/default-mutator-config" },
"NotIdenticalNotEqual": { "$ref": "#/definitions/default-mutator-config" },
"TrueValue": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"ignore": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"ignoreSourceCodeByRegex": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"format": "regex"
}
},
"settings": {
"type": "object",
"additionalProperties": false,
"properties": {
"in_array": {
"type": "boolean"
},
"array_search": {
"type": "boolean"
}
}
}
}
}
]
},
"Yield_": { "$ref": "#/definitions/default-mutator-config" },
"YieldValue": { "$ref": "#/definitions/default-mutator-config" },
"GreaterThan": { "$ref": "#/definitions/default-mutator-config" },
"GreaterThanOrEqualTo": { "$ref": "#/definitions/default-mutator-config" },
"LessThan": { "$ref": "#/definitions/default-mutator-config" },
"LessThanOrEqualTo": { "$ref": "#/definitions/default-mutator-config" },
"Equal": { "$ref": "#/definitions/default-mutator-config" },
"GreaterThanNegotiation": { "$ref": "#/definitions/default-mutator-config" },
"GreaterThanOrEqualToNegotiation": { "$ref": "#/definitions/default-mutator-config" },
"Identical": { "$ref": "#/definitions/default-mutator-config" },
"LessThanNegotiation": { "$ref": "#/definitions/default-mutator-config" },
"LessThanOrEqualToNegotiation": { "$ref": "#/definitions/default-mutator-config" },
"NotEqual": { "$ref": "#/definitions/default-mutator-config" },
"NotIdentical": { "$ref": "#/definitions/default-mutator-config" },
"PublicVisibility": { "$ref": "#/definitions/default-mutator-config" },
"ProtectedVisibility": { "$ref": "#/definitions/default-mutator-config" },
"DecrementInteger": { "$ref": "#/definitions/default-mutator-config" },
"IncrementInteger": { "$ref": "#/definitions/default-mutator-config" },
"OneZeroFloat": { "$ref": "#/definitions/default-mutator-config" },
"AssignCoalesce": { "$ref": "#/definitions/default-mutator-config" },
"Break_": { "$ref": "#/definitions/default-mutator-config" },
"Continue_": { "$ref": "#/definitions/default-mutator-config" },
"Ternary": { "$ref": "#/definitions/default-mutator-config" },
"Throw_": { "$ref": "#/definitions/default-mutator-config" },
"Finally_": { "$ref": "#/definitions/default-mutator-config" },
"Coalesce": { "$ref": "#/definitions/default-mutator-config" },
"Concat": { "$ref": "#/definitions/default-mutator-config" },
"PregQuote": { "$ref": "#/definitions/default-mutator-config" },
"PregMatchMatches": { "$ref": "#/definitions/default-mutator-config" },
"PregMatchRemoveCaret": { "$ref": "#/definitions/default-mutator-config" },
"PregMatchRemoveDollar": { "$ref": "#/definitions/default-mutator-config" },
"PregMatchRemoveFlags": { "$ref": "#/definitions/default-mutator-config" },
"NullSafePropertyCall": { "$ref": "#/definitions/default-mutator-config" },
"NullSafeMethodCall": { "$ref": "#/definitions/default-mutator-config" },
"ArrayItemRemoval": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"ignore": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"ignoreSourceCodeByRegex": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"format": "regex"
}
},
"settings": {
"type": "object",
"additionalProperties": false,
"properties": {
"remove": {
"type": "string",
"enum": [
"first",
"last",
"all"
]
},
"limit": {
"type": "integer",
"minimum": 1
}
}
}
}
}
]
},
"FunctionCallRemoval": { "$ref": "#/definitions/default-mutator-config" },
"MethodCallRemoval": { "$ref": "#/definitions/default-mutator-config" },
"CloneRemoval": { "$ref": "#/definitions/default-mutator-config" },
"ConcatOperandRemoval": { "$ref": "#/definitions/default-mutator-config" },
"SharedCaseRemoval": { "$ref": "#/definitions/default-mutator-config" },
"ArrayOneItem": { "$ref": "#/definitions/default-mutator-config" },
"FloatNegation": { "$ref": "#/definitions/default-mutator-config" },
"FunctionCall": { "$ref": "#/definitions/default-mutator-config" },
"IntegerNegation": { "$ref": "#/definitions/default-mutator-config" },
"NewObject": { "$ref": "#/definitions/default-mutator-config" },
"This": { "$ref": "#/definitions/default-mutator-config" },
"Spaceship": { "$ref": "#/definitions/default-mutator-config" },
"SpreadOneItem": { "$ref": "#/definitions/default-mutator-config" },
"SpreadAssignment": { "$ref": "#/definitions/default-mutator-config" },
"SpreadRemoval": { "$ref": "#/definitions/default-mutator-config" },
"SyntaxError": { "$ref": "#/definitions/default-mutator-config" },
"Foreach_": { "$ref": "#/definitions/default-mutator-config" },
"For_": { "$ref": "#/definitions/default-mutator-config" },
"DoWhile": { "$ref": "#/definitions/default-mutator-config" },
"While_": { "$ref": "#/definitions/default-mutator-config" },
"CastArray": { "$ref": "#/definitions/default-mutator-config" },
"CastBool": { "$ref": "#/definitions/default-mutator-config" },
"CastFloat": { "$ref": "#/definitions/default-mutator-config" },
"CastInt": { "$ref": "#/definitions/default-mutator-config" },
"CastObject": { "$ref": "#/definitions/default-mutator-config" },
"CastString": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayChangeKeyCase": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayChunk": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayColumn": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayCombine": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayDiff": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayDiffAssoc": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayDiffKey": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayDiffUassoc": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayDiffUkey": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayFilter": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayFlip": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayIntersect": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayIntersectAssoc": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayIntersectKey": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayIntersectUassoc": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayIntersectUkey": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayKeys": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayMap": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayMerge": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayMergeRecursive": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayPad": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayReduce": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayReplace": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayReplaceRecursive": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayReverse": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArraySlice": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArraySplice": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayUdiff": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayUdiffAssoc": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayUdiffUassoc": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayUintersect": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayUintersectAssoc": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayUintersectUassoc": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayUnique": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapArrayValues": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapLcFirst": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapLtrim": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapRtrim": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapStrIreplace": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapStrRepeat": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapStrReplace": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapStrRev": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapStrShuffle": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapStrToLower": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapStrToUpper": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapSubstr": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapTrim": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapUcFirst": { "$ref": "#/definitions/default-mutator-config" },
"UnwrapUcWords": { "$ref": "#/definitions/default-mutator-config" },
"BCMath": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"ignore": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"ignoreSourceCodeByRegex": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"format": "regex"
}
},
"settings": {
"type": "object",
"additionalProperties": false,
"properties": {
"bcadd": {
"type": "boolean"
},
"bccomp": {
"type": "boolean"
},
"bcdiv": {
"type": "boolean"
},
"bcmod": {
"type": "boolean"
},
"bcmul": {
"type": "boolean"
},
"bcpow": {
"type": "boolean"
},
"bcsub": {
"type": "boolean"
},
"bcsqrt": {
"type": "boolean"
},
"bcpowmod": {
"type": "boolean"
}
}
}
}
}
]
},
"MBString": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"ignore": {
"type": "array",
"items": {
"type": "string"
}
},
"ignoreSourceCodeByRegex": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"format": "regex"
}
},
"settings": {
"type": "object",
"additionalProperties": false,
"properties": {
"mb_chr": {
"type": "boolean"
},
"mb_ord": {
"type": "boolean"
},
"mb_parse_str": {
"type": "boolean"
},
"mb_send_mail": {
"type": "boolean"
},
"mb_strcut": {
"type": "boolean"
},
"mb_stripos": {
"type": "boolean"
},
"mb_stristr": {
"type": "boolean"
},
"mb_strlen": {
"type": "boolean"
},
"mb_strpos": {
"type": "boolean"
},
"mb_strrchr": {
"type": "boolean"
},
"mb_strripos": {
"type": "boolean"
},
"mb_strrpos": {
"type": "boolean"
},
"mb_strstr": {
"type": "boolean"
},
"mb_strtolower": {
"type": "boolean"
},
"mb_strtoupper": {
"type": "boolean"
},
"mb_substr_count": {
"type": "boolean"
},
"mb_substr": {
"type": "boolean"
},
"mb_convert_case": {
"type": "boolean"
}
}
}
}
}
]
}
}
},
"testFramework": {
"type": "string",
"description": "Sets the framework to use for testing. Defaults to phpunit.",
"anyOf": [
"phpunit",
"phpspec",
"codeception"
]
},
"bootstrap": {
"type": "string",
"description": "Use to specify a file to include as part of the startup to pre-configure the infection environment. Useful for adding custom autoloaders not included in composer."
},
"initialTestsPhpOptions": {
"type": "string",
"description": "Specify an additional php options for the initial test (e.g. enabling Xdebug). --initial-tests-php-options will override this option."
},
"testFrameworkOptions": {
"type": "string",
"description": "Specify an additional options to pass to the test framework (e.g. enabling Verbose Mode). --test-framework-options will override this option."
}
},
"definitions": {
"default-mutator-config": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"ignore": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"ignoreSourceCodeByRegex": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"format": "regex"
}
}
}
}
]
},
"stryker-branch": {
"type": "string",
"description": "Mutation score badge for your GitHub project. If this value starts and ends with \"/\", it will be considered a regular expression.",
"examples": [
"main",
"master",
"develop",
"latest",
"/1\\.\\d+/",
"/release-.*/",
"/feature\\/.*/"
]
}
}
}