@hailstails/hone 1.1.0 → 1.3.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.
- package/ADOPTING.md +4 -4
- package/CHANGELOG.md +22 -0
- package/MIGRATING.md +5 -5
- package/README.md +14 -8
- package/api/audit.d.ts +1 -1
- package/api/testing.js +4 -4
- package/chunks/{chunk-BLGGM7AV.js → chunk-H4V72FCW.js} +1 -1
- package/chunks/{chunk-PVCA3ISA.js → chunk-PL2PNPAR.js} +1 -1
- package/chunks/{chunk-CBWWAKQY.js → chunk-T32FOWZA.js} +1 -1
- package/chunks/{chunk-MZTLH4EU.js → chunk-Y2KPZDDV.js} +21 -1
- package/chunks/{chunk-63SJV5ZY.js → chunk-YSN46EB3.js} +41 -22
- package/core/check/tool-command.js +47 -30
- package/docs/adding-a-discipline-or-mechanism.md +1 -1
- package/docs/extending.md +5 -6
- package/docs/output-contract.md +8 -4
- package/mechanisms/audit/CD-3/compiler-overrides.js +193 -29
- package/mechanisms/audit/CD-3/piece.json +35 -7
- package/mechanisms/audit/runner/README.md +3 -2
- package/mechanisms/audit/runner/runner.js +42 -6
- package/mechanisms/audit/runner/walker-piece.d.ts +12 -0
- package/mechanisms/eslint/runner/README.md +1 -1
- package/mechanisms/eslint/runner/runner.js +60 -23
- package/package.json +1 -1
- package/rules/CD-10/CHECKS.md +2 -2
- package/rules/CD-14/CHECKS.md +2 -2
- package/rules/CD-15/CHECKS.md +2 -2
- package/rules/CD-17/CHECKS.md +2 -2
- package/rules/CD-19/CHECKS.md +2 -2
- package/rules/CD-2/CHECKS.md +2 -2
- package/rules/CD-23/CHECKS.md +2 -2
- package/rules/CD-25/CHECKS.md +2 -2
- package/rules/CD-26/CHECKS.md +2 -2
- package/rules/CD-27/CHECKS.md +2 -2
- package/rules/CD-3/CHECKS.md +35 -11
- package/rules/CD-3/discipline.json +278 -0
- package/rules/CD-40/CHECKS.md +2 -2
- package/rules/CD-41/CHECKS.md +2 -2
- package/rules/CD-42/CHECKS.md +2 -2
- package/rules/CD-43/CHECKS.md +2 -2
- package/rules/CD-44/CHECKS.md +2 -2
- package/rules/CD-47/CHECKS.md +2 -2
- package/rules/CD-5/CHECKS.md +2 -2
- package/rules/CD-6/CHECKS.md +2 -2
- package/rules/CD-7/CHECKS.md +2 -2
- package/rules/CD-7a/CHECKS.md +2 -2
- package/rules/CD-8/CHECKS.md +2 -2
|
@@ -29,6 +29,24 @@
|
|
|
29
29
|
"expectedLines": [
|
|
30
30
|
1
|
|
31
31
|
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "strict set to false under the second edition",
|
|
35
|
+
"fileName": "packages/a/tsconfig.json",
|
|
36
|
+
"source": "{\n \"compilerOptions\": {\n \"strict\": false\n }\n}\n",
|
|
37
|
+
"expectedLines": [
|
|
38
|
+
1
|
|
39
|
+
],
|
|
40
|
+
"edition": "2"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "a base that cannot be read",
|
|
44
|
+
"fileName": "packages/a/tsconfig.json",
|
|
45
|
+
"source": "{ \"extends\": \"../../tsconfig.base.json\", \"compilerOptions\": { \"target\": \"ESNext\" } }\n",
|
|
46
|
+
"expectedLines": [
|
|
47
|
+
1
|
|
48
|
+
],
|
|
49
|
+
"edition": "2"
|
|
32
50
|
}
|
|
33
51
|
],
|
|
34
52
|
"allow": [
|
|
@@ -49,6 +67,20 @@
|
|
|
49
67
|
"fileName": "tsconfig.base.json",
|
|
50
68
|
"source": "{ \"compilerOptions\": { \"strict\": true } }\n",
|
|
51
69
|
"expectedLines": []
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "tsconfig.base.json is not read under the second edition",
|
|
73
|
+
"fileName": "tsconfig.base.json",
|
|
74
|
+
"source": "{ \"compilerOptions\": { \"strict\": false } }\n",
|
|
75
|
+
"expectedLines": [],
|
|
76
|
+
"edition": "2"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "a solution-style config that compiles no files",
|
|
80
|
+
"fileName": "tsconfig.json",
|
|
81
|
+
"source": "{ \"files\": [], \"references\": [{ \"path\": \"./tsconfig.app.json\" }, { \"path\": \"./tsconfig.node.json\" }] }\n",
|
|
82
|
+
"expectedLines": [],
|
|
83
|
+
"edition": "2"
|
|
52
84
|
}
|
|
53
85
|
]
|
|
54
86
|
}
|
|
@@ -80,6 +112,33 @@
|
|
|
80
112
|
"expectedLines": [
|
|
81
113
|
1
|
|
82
114
|
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "noUncheckedIndexedAccess set to false under the second edition",
|
|
118
|
+
"fileName": "packages/a/tsconfig.json",
|
|
119
|
+
"source": "{\n \"compilerOptions\": {\n \"noUncheckedIndexedAccess\": false\n }\n}\n",
|
|
120
|
+
"expectedLines": [
|
|
121
|
+
1
|
|
122
|
+
],
|
|
123
|
+
"edition": "2"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "a base that cannot be read",
|
|
127
|
+
"fileName": "packages/a/tsconfig.json",
|
|
128
|
+
"source": "{ \"extends\": \"../../tsconfig.base.json\", \"compilerOptions\": { \"target\": \"ESNext\" } }\n",
|
|
129
|
+
"expectedLines": [
|
|
130
|
+
1
|
|
131
|
+
],
|
|
132
|
+
"edition": "2"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "noUncheckedIndexedAccess unset with no base",
|
|
136
|
+
"fileName": "packages/b/tsconfig.json",
|
|
137
|
+
"source": "{ \"compilerOptions\": { \"outDir\": \"dist\", \"target\": \"ESNext\" } }\n",
|
|
138
|
+
"expectedLines": [
|
|
139
|
+
1
|
|
140
|
+
],
|
|
141
|
+
"edition": "2"
|
|
83
142
|
}
|
|
84
143
|
],
|
|
85
144
|
"allow": [
|
|
@@ -100,6 +159,20 @@
|
|
|
100
159
|
"fileName": "tsconfig.base.json",
|
|
101
160
|
"source": "{ \"compilerOptions\": { \"noUncheckedIndexedAccess\": true } }\n",
|
|
102
161
|
"expectedLines": []
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "tsconfig.base.json is not read under the second edition",
|
|
165
|
+
"fileName": "tsconfig.base.json",
|
|
166
|
+
"source": "{ \"compilerOptions\": { \"noUncheckedIndexedAccess\": false } }\n",
|
|
167
|
+
"expectedLines": [],
|
|
168
|
+
"edition": "2"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "a solution-style config that compiles no files",
|
|
172
|
+
"fileName": "tsconfig.json",
|
|
173
|
+
"source": "{ \"files\": [], \"references\": [{ \"path\": \"./tsconfig.app.json\" }, { \"path\": \"./tsconfig.node.json\" }] }\n",
|
|
174
|
+
"expectedLines": [],
|
|
175
|
+
"edition": "2"
|
|
103
176
|
}
|
|
104
177
|
]
|
|
105
178
|
}
|
|
@@ -131,6 +204,33 @@
|
|
|
131
204
|
"expectedLines": [
|
|
132
205
|
1
|
|
133
206
|
]
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "exactOptionalPropertyTypes set to false under the second edition",
|
|
210
|
+
"fileName": "packages/a/tsconfig.json",
|
|
211
|
+
"source": "{\n \"compilerOptions\": {\n \"exactOptionalPropertyTypes\": false\n }\n}\n",
|
|
212
|
+
"expectedLines": [
|
|
213
|
+
1
|
|
214
|
+
],
|
|
215
|
+
"edition": "2"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"name": "a base that cannot be read",
|
|
219
|
+
"fileName": "packages/a/tsconfig.json",
|
|
220
|
+
"source": "{ \"extends\": \"../../tsconfig.base.json\", \"compilerOptions\": { \"target\": \"ESNext\" } }\n",
|
|
221
|
+
"expectedLines": [
|
|
222
|
+
1
|
|
223
|
+
],
|
|
224
|
+
"edition": "2"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "exactOptionalPropertyTypes unset with no base",
|
|
228
|
+
"fileName": "packages/b/tsconfig.json",
|
|
229
|
+
"source": "{ \"compilerOptions\": { \"outDir\": \"dist\", \"target\": \"ESNext\" } }\n",
|
|
230
|
+
"expectedLines": [
|
|
231
|
+
1
|
|
232
|
+
],
|
|
233
|
+
"edition": "2"
|
|
134
234
|
}
|
|
135
235
|
],
|
|
136
236
|
"allow": [
|
|
@@ -151,6 +251,20 @@
|
|
|
151
251
|
"fileName": "tsconfig.base.json",
|
|
152
252
|
"source": "{ \"compilerOptions\": { \"exactOptionalPropertyTypes\": true } }\n",
|
|
153
253
|
"expectedLines": []
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "tsconfig.base.json is not read under the second edition",
|
|
257
|
+
"fileName": "tsconfig.base.json",
|
|
258
|
+
"source": "{ \"compilerOptions\": { \"exactOptionalPropertyTypes\": false } }\n",
|
|
259
|
+
"expectedLines": [],
|
|
260
|
+
"edition": "2"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"name": "a solution-style config that compiles no files",
|
|
264
|
+
"fileName": "tsconfig.json",
|
|
265
|
+
"source": "{ \"files\": [], \"references\": [{ \"path\": \"./tsconfig.app.json\" }, { \"path\": \"./tsconfig.node.json\" }] }\n",
|
|
266
|
+
"expectedLines": [],
|
|
267
|
+
"edition": "2"
|
|
154
268
|
}
|
|
155
269
|
]
|
|
156
270
|
}
|
|
@@ -182,6 +296,33 @@
|
|
|
182
296
|
"expectedLines": [
|
|
183
297
|
1
|
|
184
298
|
]
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "noImplicitOverride set to false under the second edition",
|
|
302
|
+
"fileName": "packages/a/tsconfig.json",
|
|
303
|
+
"source": "{\n \"compilerOptions\": {\n \"noImplicitOverride\": false\n }\n}\n",
|
|
304
|
+
"expectedLines": [
|
|
305
|
+
1
|
|
306
|
+
],
|
|
307
|
+
"edition": "2"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"name": "a base that cannot be read",
|
|
311
|
+
"fileName": "packages/a/tsconfig.json",
|
|
312
|
+
"source": "{ \"extends\": \"../../tsconfig.base.json\", \"compilerOptions\": { \"target\": \"ESNext\" } }\n",
|
|
313
|
+
"expectedLines": [
|
|
314
|
+
1
|
|
315
|
+
],
|
|
316
|
+
"edition": "2"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "noImplicitOverride unset with no base",
|
|
320
|
+
"fileName": "packages/b/tsconfig.json",
|
|
321
|
+
"source": "{ \"compilerOptions\": { \"outDir\": \"dist\", \"target\": \"ESNext\" } }\n",
|
|
322
|
+
"expectedLines": [
|
|
323
|
+
1
|
|
324
|
+
],
|
|
325
|
+
"edition": "2"
|
|
185
326
|
}
|
|
186
327
|
],
|
|
187
328
|
"allow": [
|
|
@@ -202,6 +343,20 @@
|
|
|
202
343
|
"fileName": "tsconfig.base.json",
|
|
203
344
|
"source": "{ \"compilerOptions\": { \"noImplicitOverride\": true } }\n",
|
|
204
345
|
"expectedLines": []
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"name": "tsconfig.base.json is not read under the second edition",
|
|
349
|
+
"fileName": "tsconfig.base.json",
|
|
350
|
+
"source": "{ \"compilerOptions\": { \"noImplicitOverride\": false } }\n",
|
|
351
|
+
"expectedLines": [],
|
|
352
|
+
"edition": "2"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "a solution-style config that compiles no files",
|
|
356
|
+
"fileName": "tsconfig.json",
|
|
357
|
+
"source": "{ \"files\": [], \"references\": [{ \"path\": \"./tsconfig.app.json\" }, { \"path\": \"./tsconfig.node.json\" }] }\n",
|
|
358
|
+
"expectedLines": [],
|
|
359
|
+
"edition": "2"
|
|
205
360
|
}
|
|
206
361
|
]
|
|
207
362
|
}
|
|
@@ -233,6 +388,33 @@
|
|
|
233
388
|
"expectedLines": [
|
|
234
389
|
1
|
|
235
390
|
]
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"name": "noFallthroughCasesInSwitch set to false under the second edition",
|
|
394
|
+
"fileName": "packages/a/tsconfig.json",
|
|
395
|
+
"source": "{\n \"compilerOptions\": {\n \"noFallthroughCasesInSwitch\": false\n }\n}\n",
|
|
396
|
+
"expectedLines": [
|
|
397
|
+
1
|
|
398
|
+
],
|
|
399
|
+
"edition": "2"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "a base that cannot be read",
|
|
403
|
+
"fileName": "packages/a/tsconfig.json",
|
|
404
|
+
"source": "{ \"extends\": \"../../tsconfig.base.json\", \"compilerOptions\": { \"target\": \"ESNext\" } }\n",
|
|
405
|
+
"expectedLines": [
|
|
406
|
+
1
|
|
407
|
+
],
|
|
408
|
+
"edition": "2"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"name": "noFallthroughCasesInSwitch unset with no base",
|
|
412
|
+
"fileName": "packages/b/tsconfig.json",
|
|
413
|
+
"source": "{ \"compilerOptions\": { \"outDir\": \"dist\", \"target\": \"ESNext\" } }\n",
|
|
414
|
+
"expectedLines": [
|
|
415
|
+
1
|
|
416
|
+
],
|
|
417
|
+
"edition": "2"
|
|
236
418
|
}
|
|
237
419
|
],
|
|
238
420
|
"allow": [
|
|
@@ -253,6 +435,20 @@
|
|
|
253
435
|
"fileName": "tsconfig.base.json",
|
|
254
436
|
"source": "{ \"compilerOptions\": { \"noFallthroughCasesInSwitch\": true } }\n",
|
|
255
437
|
"expectedLines": []
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"name": "tsconfig.base.json is not read under the second edition",
|
|
441
|
+
"fileName": "tsconfig.base.json",
|
|
442
|
+
"source": "{ \"compilerOptions\": { \"noFallthroughCasesInSwitch\": false } }\n",
|
|
443
|
+
"expectedLines": [],
|
|
444
|
+
"edition": "2"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"name": "a solution-style config that compiles no files",
|
|
448
|
+
"fileName": "tsconfig.json",
|
|
449
|
+
"source": "{ \"files\": [], \"references\": [{ \"path\": \"./tsconfig.app.json\" }, { \"path\": \"./tsconfig.node.json\" }] }\n",
|
|
450
|
+
"expectedLines": [],
|
|
451
|
+
"edition": "2"
|
|
256
452
|
}
|
|
257
453
|
]
|
|
258
454
|
}
|
|
@@ -284,6 +480,33 @@
|
|
|
284
480
|
"expectedLines": [
|
|
285
481
|
1
|
|
286
482
|
]
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"name": "noPropertyAccessFromIndexSignature set to false under the second edition",
|
|
486
|
+
"fileName": "packages/a/tsconfig.json",
|
|
487
|
+
"source": "{\n \"compilerOptions\": {\n \"noPropertyAccessFromIndexSignature\": false\n }\n}\n",
|
|
488
|
+
"expectedLines": [
|
|
489
|
+
1
|
|
490
|
+
],
|
|
491
|
+
"edition": "2"
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"name": "a base that cannot be read",
|
|
495
|
+
"fileName": "packages/a/tsconfig.json",
|
|
496
|
+
"source": "{ \"extends\": \"../../tsconfig.base.json\", \"compilerOptions\": { \"target\": \"ESNext\" } }\n",
|
|
497
|
+
"expectedLines": [
|
|
498
|
+
1
|
|
499
|
+
],
|
|
500
|
+
"edition": "2"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"name": "noPropertyAccessFromIndexSignature unset with no base",
|
|
504
|
+
"fileName": "packages/b/tsconfig.json",
|
|
505
|
+
"source": "{ \"compilerOptions\": { \"outDir\": \"dist\", \"target\": \"ESNext\" } }\n",
|
|
506
|
+
"expectedLines": [
|
|
507
|
+
1
|
|
508
|
+
],
|
|
509
|
+
"edition": "2"
|
|
287
510
|
}
|
|
288
511
|
],
|
|
289
512
|
"allow": [
|
|
@@ -304,6 +527,20 @@
|
|
|
304
527
|
"fileName": "tsconfig.base.json",
|
|
305
528
|
"source": "{ \"compilerOptions\": { \"noPropertyAccessFromIndexSignature\": true } }\n",
|
|
306
529
|
"expectedLines": []
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"name": "tsconfig.base.json is not read under the second edition",
|
|
533
|
+
"fileName": "tsconfig.base.json",
|
|
534
|
+
"source": "{ \"compilerOptions\": { \"noPropertyAccessFromIndexSignature\": false } }\n",
|
|
535
|
+
"expectedLines": [],
|
|
536
|
+
"edition": "2"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"name": "a solution-style config that compiles no files",
|
|
540
|
+
"fileName": "tsconfig.json",
|
|
541
|
+
"source": "{ \"files\": [], \"references\": [{ \"path\": \"./tsconfig.app.json\" }, { \"path\": \"./tsconfig.node.json\" }] }\n",
|
|
542
|
+
"expectedLines": [],
|
|
543
|
+
"edition": "2"
|
|
307
544
|
}
|
|
308
545
|
]
|
|
309
546
|
}
|
|
@@ -335,6 +572,33 @@
|
|
|
335
572
|
"expectedLines": [
|
|
336
573
|
1
|
|
337
574
|
]
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
"name": "useUnknownInCatchVariables set to false under the second edition",
|
|
578
|
+
"fileName": "packages/a/tsconfig.json",
|
|
579
|
+
"source": "{\n \"compilerOptions\": {\n \"useUnknownInCatchVariables\": false\n }\n}\n",
|
|
580
|
+
"expectedLines": [
|
|
581
|
+
1
|
|
582
|
+
],
|
|
583
|
+
"edition": "2"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"name": "a base that cannot be read",
|
|
587
|
+
"fileName": "packages/a/tsconfig.json",
|
|
588
|
+
"source": "{ \"extends\": \"../../tsconfig.base.json\", \"compilerOptions\": { \"target\": \"ESNext\" } }\n",
|
|
589
|
+
"expectedLines": [
|
|
590
|
+
1
|
|
591
|
+
],
|
|
592
|
+
"edition": "2"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "turned off by strict set to false in the same file",
|
|
596
|
+
"fileName": "packages/b/tsconfig.json",
|
|
597
|
+
"source": "{ \"compilerOptions\": { \"strict\": false } }\n",
|
|
598
|
+
"expectedLines": [
|
|
599
|
+
1
|
|
600
|
+
],
|
|
601
|
+
"edition": "2"
|
|
338
602
|
}
|
|
339
603
|
],
|
|
340
604
|
"allow": [
|
|
@@ -355,6 +619,20 @@
|
|
|
355
619
|
"fileName": "tsconfig.base.json",
|
|
356
620
|
"source": "{ \"compilerOptions\": { \"useUnknownInCatchVariables\": true } }\n",
|
|
357
621
|
"expectedLines": []
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"name": "tsconfig.base.json is not read under the second edition",
|
|
625
|
+
"fileName": "tsconfig.base.json",
|
|
626
|
+
"source": "{ \"compilerOptions\": { \"useUnknownInCatchVariables\": false } }\n",
|
|
627
|
+
"expectedLines": [],
|
|
628
|
+
"edition": "2"
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"name": "a solution-style config that compiles no files",
|
|
632
|
+
"fileName": "tsconfig.json",
|
|
633
|
+
"source": "{ \"files\": [], \"references\": [{ \"path\": \"./tsconfig.app.json\" }, { \"path\": \"./tsconfig.node.json\" }] }\n",
|
|
634
|
+
"expectedLines": [],
|
|
635
|
+
"edition": "2"
|
|
358
636
|
}
|
|
359
637
|
]
|
|
360
638
|
}
|
package/rules/CD-40/CHECKS.md
CHANGED
|
@@ -28,7 +28,7 @@ const createOrder = ({ customerId, items, currency }: OrderRequest) => ({ custom
|
|
|
28
28
|
Take one object with named fields so each call site reads as a labelled contract.
|
|
29
29
|
|
|
30
30
|
## Exceptions
|
|
31
|
-
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file must implement a callback signature fixed by an external library. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs
|
|
31
|
+
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file must implement a callback signature fixed by an external library. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs no `whyChain`. Judgement clauses cannot be selected and need no exception record. See [discipline-exceptions.json](../../README.md#discipline-exceptionsjson).
|
|
32
32
|
|
|
33
33
|
```json
|
|
34
34
|
{ "version": 1, "exceptions": [
|
|
@@ -36,4 +36,4 @@ Add an entry to `discipline-exceptions.json` at the repository root. Use `author
|
|
|
36
36
|
] }
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
An `authorised-location` or `clause-wide-carve-out` also needs a `whyChain` that follows the [why-chain contract](../../docs/why-chain-contract.md): five whys chained cause to cause, a `rootCause`, its `rootCheck`, a `readback` and an `owner`. A record imported from an earlier system carries `provenance` instead. A `file-carve-out` is debt and needs only its `kind`, `clause` and `file`; its `reason` is an optional note, and a `whyChain` or `provenance` it gives anyway is still judged. With `"fileExceptionWhyChains": "optional"` in `disciplines.json`, an `authorised-location` may give only its `reason`, which will be refused in the next major release. [The exceptions format](../../README.md#discipline-exceptionsjson) gives each shape.
|
package/rules/CD-41/CHECKS.md
CHANGED
|
@@ -43,7 +43,7 @@ const settle = (orders: Order[]) => orders.filter(isPaid).forEach(refundEligible
|
|
|
43
43
|
Move each branch into a named helper so the orchestrator only composes calls.
|
|
44
44
|
|
|
45
45
|
## Exceptions
|
|
46
|
-
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file holds a function whose shape is fixed by an external contract. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs
|
|
46
|
+
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file holds a function whose shape is fixed by an external contract. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs no `whyChain`. Judgement clauses cannot be selected and need no exception record. See [discipline-exceptions.json](../../README.md#discipline-exceptionsjson).
|
|
47
47
|
|
|
48
48
|
```json
|
|
49
49
|
{ "version": 1, "exceptions": [
|
|
@@ -51,4 +51,4 @@ Add an entry to `discipline-exceptions.json` at the repository root. Use `author
|
|
|
51
51
|
] }
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
An `authorised-location` or `clause-wide-carve-out` also needs a `whyChain` that follows the [why-chain contract](../../docs/why-chain-contract.md): five whys chained cause to cause, a `rootCause`, its `rootCheck`, a `readback` and an `owner`. A record imported from an earlier system carries `provenance` instead. A `file-carve-out` is debt and needs only its `kind`, `clause` and `file`; its `reason` is an optional note, and a `whyChain` or `provenance` it gives anyway is still judged. With `"fileExceptionWhyChains": "optional"` in `disciplines.json`, an `authorised-location` may give only its `reason`, which will be refused in the next major release. [The exceptions format](../../README.md#discipline-exceptionsjson) gives each shape.
|
package/rules/CD-42/CHECKS.md
CHANGED
|
@@ -36,7 +36,7 @@ const label = (order: Order) => {
|
|
|
36
36
|
Handle the unhappy path first with an early return and leave the happy path as the final return.
|
|
37
37
|
|
|
38
38
|
## Exceptions
|
|
39
|
-
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file must keep an else for an external reason. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs
|
|
39
|
+
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file must keep an else for an external reason. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs no `whyChain`. Judgement clauses cannot be selected and need no exception record. See [discipline-exceptions.json](../../README.md#discipline-exceptionsjson).
|
|
40
40
|
|
|
41
41
|
```json
|
|
42
42
|
{ "version": 1, "exceptions": [
|
|
@@ -44,4 +44,4 @@ Add an entry to `discipline-exceptions.json` at the repository root. Use `author
|
|
|
44
44
|
] }
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
An `authorised-location` or `clause-wide-carve-out` also needs a `whyChain` that follows the [why-chain contract](../../docs/why-chain-contract.md): five whys chained cause to cause, a `rootCause`, its `rootCheck`, a `readback` and an `owner`. A record imported from an earlier system carries `provenance` instead. A `file-carve-out` is debt and needs only its `kind`, `clause` and `file`; its `reason` is an optional note, and a `whyChain` or `provenance` it gives anyway is still judged. With `"fileExceptionWhyChains": "optional"` in `disciplines.json`, an `authorised-location` may give only its `reason`, which will be refused in the next major release. [The exceptions format](../../README.md#discipline-exceptionsjson) gives each shape.
|
package/rules/CD-43/CHECKS.md
CHANGED
|
@@ -26,7 +26,7 @@ const render = (mode: "compact" | "full"): string => "";
|
|
|
26
26
|
Name each state in the type.
|
|
27
27
|
|
|
28
28
|
## Exceptions
|
|
29
|
-
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file must follow an external interface that uses a boolean. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs
|
|
29
|
+
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file must follow an external interface that uses a boolean. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs no `whyChain`. See [discipline-exceptions.json](../../README.md#discipline-exceptionsjson).
|
|
30
30
|
|
|
31
31
|
```json
|
|
32
32
|
{ "version": 1, "exceptions": [
|
|
@@ -34,4 +34,4 @@ Add an entry to `discipline-exceptions.json` at the repository root. Use `author
|
|
|
34
34
|
] }
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
An `authorised-location` or `clause-wide-carve-out` also needs a `whyChain` that follows the [why-chain contract](../../docs/why-chain-contract.md): five whys chained cause to cause, a `rootCause`, its `rootCheck`, a `readback` and an `owner`. A record imported from an earlier system carries `provenance` instead. A `file-carve-out` is debt and needs only its `kind`, `clause` and `file`; its `reason` is an optional note, and a `whyChain` or `provenance` it gives anyway is still judged. With `"fileExceptionWhyChains": "optional"` in `disciplines.json`, an `authorised-location` may give only its `reason`, which will be refused in the next major release. [The exceptions format](../../README.md#discipline-exceptionsjson) gives each shape.
|
package/rules/CD-44/CHECKS.md
CHANGED
|
@@ -37,7 +37,7 @@ const withTotal = (order: Order): Order => ({ ...order, total: 10 });
|
|
|
37
37
|
Copy before sorting or reversing: `[...items].sort()`.
|
|
38
38
|
|
|
39
39
|
## Exceptions
|
|
40
|
-
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file must fill an output object supplied by an external API. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs
|
|
40
|
+
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file must fill an output object supplied by an external API. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs no `whyChain`. See [discipline-exceptions.json](../../README.md#discipline-exceptionsjson).
|
|
41
41
|
|
|
42
42
|
```json
|
|
43
43
|
{ "version": 1, "exceptions": [
|
|
@@ -45,4 +45,4 @@ Add an entry to `discipline-exceptions.json` at the repository root. Use `author
|
|
|
45
45
|
] }
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
An `authorised-location` or `clause-wide-carve-out` also needs a `whyChain` that follows the [why-chain contract](../../docs/why-chain-contract.md): five whys chained cause to cause, a `rootCause`, its `rootCheck`, a `readback` and an `owner`. A record imported from an earlier system carries `provenance` instead. A `file-carve-out` is debt and needs only its `kind`, `clause` and `file`; its `reason` is an optional note, and a `whyChain` or `provenance` it gives anyway is still judged. With `"fileExceptionWhyChains": "optional"` in `disciplines.json`, an `authorised-location` may give only its `reason`, which will be refused in the next major release. [The exceptions format](../../README.md#discipline-exceptionsjson) gives each shape.
|
package/rules/CD-47/CHECKS.md
CHANGED
|
@@ -26,7 +26,7 @@ spawnSync("git", ["init"], { cwd: directory, env: hermeticGitEnvironment() });
|
|
|
26
26
|
Build the environment without inherited git variables or the user's configuration, and run in a temporary directory.
|
|
27
27
|
|
|
28
28
|
## Exceptions
|
|
29
|
-
Record exemptions only in `discipline-exceptions.json` at the repository root; core reads no other allowance file. Use `authorised-location` when a test file legitimately builds its environment another way. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs
|
|
29
|
+
Record exemptions only in `discipline-exceptions.json` at the repository root; core reads no other allowance file. Use `authorised-location` when a test file legitimately builds its environment another way. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs no `whyChain`. See [discipline-exceptions.json](../../README.md#discipline-exceptionsjson).
|
|
30
30
|
|
|
31
31
|
```json
|
|
32
32
|
{ "version": 1, "exceptions": [
|
|
@@ -34,4 +34,4 @@ Record exemptions only in `discipline-exceptions.json` at the repository root; c
|
|
|
34
34
|
] }
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
An `authorised-location` or `clause-wide-carve-out` also needs a `whyChain` that follows the [why-chain contract](../../docs/why-chain-contract.md): five whys chained cause to cause, a `rootCause`, its `rootCheck`, a `readback` and an `owner`. A record imported from an earlier system carries `provenance` instead. A `file-carve-out` is debt and needs only its `kind`, `clause` and `file`; its `reason` is an optional note, and a `whyChain` or `provenance` it gives anyway is still judged. With `"fileExceptionWhyChains": "optional"` in `disciplines.json`, an `authorised-location` may give only its `reason`, which will be refused in the next major release. [The exceptions format](../../README.md#discipline-exceptionsjson) gives each shape.
|
package/rules/CD-5/CHECKS.md
CHANGED
|
@@ -41,7 +41,7 @@ const first = items[0];
|
|
|
41
41
|
Remove the need for the directive. If it must stay, add a tracked reference to the work that removes it: `// biome-ignore lint/style/noNonNullAssertion: until items is typed as a non-empty tuple (#42)`. The reference satisfies this clause only. A directive that escapes a selected clause, such as an `eslint-disable` naming a selected rule or a `@ts-expect-error` under `CD-2#cast-expressions`, still needs a file record on that clause, and that record does not satisfy this clause.
|
|
42
42
|
|
|
43
43
|
## Exceptions
|
|
44
|
-
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file legitimately carries untracked directives, such as generated code. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs
|
|
44
|
+
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file legitimately carries untracked directives, such as generated code. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs no `whyChain`. See [discipline-exceptions.json](../../README.md#discipline-exceptionsjson).
|
|
45
45
|
|
|
46
46
|
```json
|
|
47
47
|
{ "version": 1, "exceptions": [
|
|
@@ -49,4 +49,4 @@ Add an entry to `discipline-exceptions.json` at the repository root. Use `author
|
|
|
49
49
|
] }
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
An `authorised-location` or `clause-wide-carve-out` also needs a `whyChain` that follows the [why-chain contract](../../docs/why-chain-contract.md): five whys chained cause to cause, a `rootCause`, its `rootCheck`, a `readback` and an `owner`. A record imported from an earlier system carries `provenance` instead. A `file-carve-out` is debt and needs only its `kind`, `clause` and `file`; its `reason` is an optional note, and a `whyChain` or `provenance` it gives anyway is still judged. With `"fileExceptionWhyChains": "optional"` in `disciplines.json`, an `authorised-location` may give only its `reason`, which will be refused in the next major release. [The exceptions format](../../README.md#discipline-exceptionsjson) gives each shape.
|
package/rules/CD-6/CHECKS.md
CHANGED
|
@@ -40,7 +40,7 @@ const account = await loadAccount(id);
|
|
|
40
40
|
Name the value for what it is in the domain.
|
|
41
41
|
|
|
42
42
|
## Exceptions
|
|
43
|
-
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file must keep a name fixed by an external contract. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs
|
|
43
|
+
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a file must keep a name fixed by an external contract. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs no `whyChain`. See [discipline-exceptions.json](../../README.md#discipline-exceptionsjson).
|
|
44
44
|
|
|
45
45
|
```json
|
|
46
46
|
{ "version": 1, "exceptions": [
|
|
@@ -48,4 +48,4 @@ Add an entry to `discipline-exceptions.json` at the repository root. Use `author
|
|
|
48
48
|
] }
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
An `authorised-location` or `clause-wide-carve-out` also needs a `whyChain` that follows the [why-chain contract](../../docs/why-chain-contract.md): five whys chained cause to cause, a `rootCause`, its `rootCheck`, a `readback` and an `owner`. A record imported from an earlier system carries `provenance` instead. A `file-carve-out` is debt and needs only its `kind`, `clause` and `file`; its `reason` is an optional note, and a `whyChain` or `provenance` it gives anyway is still judged. With `"fileExceptionWhyChains": "optional"` in `disciplines.json`, an `authorised-location` may give only its `reason`, which will be refused in the next major release. [The exceptions format](../../README.md#discipline-exceptionsjson) gives each shape.
|
package/rules/CD-7/CHECKS.md
CHANGED
|
@@ -35,7 +35,7 @@ src/price-formatting.ts
|
|
|
35
35
|
Rename the file or folder for what it contains, or split it into files that each hold one thing.
|
|
36
36
|
|
|
37
37
|
## Exceptions
|
|
38
|
-
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a path name is fixed by a framework or external convention. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs
|
|
38
|
+
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a path name is fixed by a framework or external convention. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs no `whyChain`. See [discipline-exceptions.json](../../README.md#discipline-exceptionsjson).
|
|
39
39
|
|
|
40
40
|
```json
|
|
41
41
|
{ "version": 1, "exceptions": [
|
|
@@ -43,4 +43,4 @@ Add an entry to `discipline-exceptions.json` at the repository root. Use `author
|
|
|
43
43
|
] }
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
An `authorised-location` or `clause-wide-carve-out` also needs a `whyChain` that follows the [why-chain contract](../../docs/why-chain-contract.md): five whys chained cause to cause, a `rootCause`, its `rootCheck`, a `readback` and an `owner`. A record imported from an earlier system carries `provenance` instead. A `file-carve-out` is debt and needs only its `kind`, `clause` and `file`; its `reason` is an optional note, and a `whyChain` or `provenance` it gives anyway is still judged. With `"fileExceptionWhyChains": "optional"` in `disciplines.json`, an `authorised-location` may give only its `reason`, which will be refused in the next major release. [The exceptions format](../../README.md#discipline-exceptionsjson) gives each shape.
|
package/rules/CD-7a/CHECKS.md
CHANGED
|
@@ -27,7 +27,7 @@ const createClient = (): Client => ({ send: () => undefined });
|
|
|
27
27
|
Declare and export the type, then annotate the factory with it.
|
|
28
28
|
|
|
29
29
|
## Exceptions
|
|
30
|
-
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when the type comes from a library whose package exports no named return type. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs
|
|
30
|
+
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when the type comes from a library whose package exports no named return type. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs no `whyChain`. See [discipline-exceptions.json](../../README.md#discipline-exceptionsjson).
|
|
31
31
|
|
|
32
32
|
```json
|
|
33
33
|
{ "version": 1, "exceptions": [
|
|
@@ -35,4 +35,4 @@ Add an entry to `discipline-exceptions.json` at the repository root. Use `author
|
|
|
35
35
|
] }
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
An `authorised-location` or `clause-wide-carve-out` also needs a `whyChain` that follows the [why-chain contract](../../docs/why-chain-contract.md): five whys chained cause to cause, a `rootCause`, its `rootCheck`, a `readback` and an `owner`. A record imported from an earlier system carries `provenance` instead. A `file-carve-out` is debt and needs only its `kind`, `clause` and `file`; its `reason` is an optional note, and a `whyChain` or `provenance` it gives anyway is still judged. With `"fileExceptionWhyChains": "optional"` in `disciplines.json`, an `authorised-location` may give only its `reason`, which will be refused in the next major release. [The exceptions format](../../README.md#discipline-exceptionsjson) gives each shape.
|
package/rules/CD-8/CHECKS.md
CHANGED
|
@@ -31,7 +31,7 @@ switch (event.kind) {
|
|
|
31
31
|
Name each remaining variant so the compiler checks exhaustiveness.
|
|
32
32
|
|
|
33
33
|
## Exceptions
|
|
34
|
-
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a switch is over an open set of values and needs a fallback. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs
|
|
34
|
+
Add an entry to `discipline-exceptions.json` at the repository root. Use `authorised-location` when a switch is over an open set of values and needs a fallback. Use `file-carve-out` for debt in one file: it is forfeited once the file is touched, and needs no `whyChain`. See [discipline-exceptions.json](../../README.md#discipline-exceptionsjson).
|
|
35
35
|
|
|
36
36
|
```json
|
|
37
37
|
{ "version": 1, "exceptions": [
|
|
@@ -39,4 +39,4 @@ Add an entry to `discipline-exceptions.json` at the repository root. Use `author
|
|
|
39
39
|
] }
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
An `authorised-location` or `clause-wide-carve-out` also needs a `whyChain` that follows the [why-chain contract](../../docs/why-chain-contract.md): five whys chained cause to cause, a `rootCause`, its `rootCheck`, a `readback` and an `owner`. A record imported from an earlier system carries `provenance` instead. A `file-carve-out` is debt and needs only its `kind`, `clause` and `file`; its `reason` is an optional note, and a `whyChain` or `provenance` it gives anyway is still judged. With `"fileExceptionWhyChains": "optional"` in `disciplines.json`, an `authorised-location` may give only its `reason`, which will be refused in the next major release. [The exceptions format](../../README.md#discipline-exceptionsjson) gives each shape.
|