@nielspeter/eess 0.4.0 → 0.5.1
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/README.md +94 -1
- package/dist/baseline-generator.d.ts +9 -0
- package/dist/baseline-generator.d.ts.map +1 -1
- package/dist/baseline-generator.js +9 -0
- package/dist/baseline-generator.js.map +1 -1
- package/dist/baseline.d.ts +1 -1
- package/dist/cardinality.d.ts.map +1 -1
- package/dist/cardinality.js +20 -5
- package/dist/cardinality.js.map +1 -1
- package/dist/cli-config.d.ts +106 -0
- package/dist/cli-config.d.ts.map +1 -0
- package/dist/cli-config.js +231 -0
- package/dist/cli-config.js.map +1 -0
- package/dist/collect-result.d.ts +94 -0
- package/dist/collect-result.d.ts.map +1 -0
- package/dist/collect-result.js +142 -0
- package/dist/collect-result.js.map +1 -0
- package/dist/combinators.d.ts +14 -0
- package/dist/combinators.d.ts.map +1 -1
- package/dist/combinators.js +53 -16
- package/dist/combinators.js.map +1 -1
- package/dist/condition.d.ts +37 -0
- package/dist/condition.d.ts.map +1 -1
- package/dist/condition.js +48 -1
- package/dist/condition.js.map +1 -1
- package/dist/correspondence.d.ts +30 -0
- package/dist/correspondence.d.ts.map +1 -1
- package/dist/correspondence.js +36 -1
- package/dist/correspondence.js.map +1 -1
- package/dist/dedupe-config-findings.d.ts.map +1 -1
- package/dist/dedupe-config-findings.js +27 -0
- package/dist/dedupe-config-findings.js.map +1 -1
- package/dist/diff-aware.d.ts +8 -9
- package/dist/diff-aware.d.ts.map +1 -1
- package/dist/diff-aware.js +38 -17
- package/dist/diff-aware.js.map +1 -1
- package/dist/emitter-findings.d.ts +167 -0
- package/dist/emitter-findings.d.ts.map +1 -0
- package/dist/emitter-findings.js +237 -0
- package/dist/emitter-findings.js.map +1 -0
- package/dist/errors.d.ts +48 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +61 -0
- package/dist/errors.js.map +1 -1
- package/dist/exclusion-comments.d.ts +36 -1
- package/dist/exclusion-comments.d.ts.map +1 -1
- package/dist/exclusion-comments.js +185 -37
- package/dist/exclusion-comments.js.map +1 -1
- package/dist/execute-rule.d.ts +12 -3
- package/dist/execute-rule.d.ts.map +1 -1
- package/dist/execute-rule.js +184 -7
- package/dist/execute-rule.js.map +1 -1
- package/dist/file-walk.d.ts +22 -0
- package/dist/file-walk.d.ts.map +1 -0
- package/dist/file-walk.js +51 -0
- package/dist/file-walk.js.map +1 -0
- package/dist/format-json.d.ts +13 -0
- package/dist/format-json.d.ts.map +1 -1
- package/dist/format-json.js +24 -0
- package/dist/format-json.js.map +1 -1
- package/dist/index.d.ts +14 -46
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -41
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +55 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +92 -0
- package/dist/internal.js.map +1 -0
- package/dist/mask-non-comment.d.ts +49 -0
- package/dist/mask-non-comment.d.ts.map +1 -0
- package/dist/mask-non-comment.js +261 -0
- package/dist/mask-non-comment.js.map +1 -0
- package/dist/owns-empty-discovery.d.ts.map +1 -1
- package/dist/owns-empty-discovery.js +12 -4
- package/dist/owns-empty-discovery.js.map +1 -1
- package/dist/path-suffix.d.ts +57 -0
- package/dist/path-suffix.d.ts.map +1 -0
- package/dist/path-suffix.js +73 -0
- package/dist/path-suffix.js.map +1 -0
- package/dist/predicate.d.ts +12 -0
- package/dist/predicate.d.ts.map +1 -1
- package/dist/predicate.js +20 -1
- package/dist/predicate.js.map +1 -1
- package/dist/preset-dispatch.d.ts +6 -34
- package/dist/preset-dispatch.d.ts.map +1 -1
- package/dist/preset-dispatch.js +30 -52
- package/dist/preset-dispatch.js.map +1 -1
- package/dist/report.d.ts +31 -7
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +174 -15
- package/dist/report.js.map +1 -1
- package/dist/rule-builder-like.d.ts +8 -2
- package/dist/rule-builder-like.d.ts.map +1 -1
- package/dist/rule-builder.d.ts +15 -0
- package/dist/rule-builder.d.ts.map +1 -1
- package/dist/rule-builder.js +41 -36
- package/dist/rule-builder.js.map +1 -1
- package/dist/rule-description.d.ts +50 -0
- package/dist/rule-description.d.ts.map +1 -1
- package/dist/rule-description.js +58 -0
- package/dist/rule-description.js.map +1 -1
- package/dist/selection-memo.d.ts +1 -3
- package/dist/selection-memo.d.ts.map +1 -1
- package/dist/selection-memo.js +1 -3
- package/dist/selection-memo.js.map +1 -1
- package/dist/silent-exclusion.d.ts +12 -0
- package/dist/silent-exclusion.d.ts.map +1 -1
- package/dist/silent-exclusion.js +22 -0
- package/dist/silent-exclusion.js.map +1 -1
- package/dist/terminal-builder.d.ts +29 -15
- package/dist/terminal-builder.d.ts.map +1 -1
- package/dist/terminal-builder.js +97 -51
- package/dist/terminal-builder.js.map +1 -1
- package/dist/vacuity-findings.d.ts +0 -6
- package/dist/vacuity-findings.d.ts.map +1 -1
- package/dist/vacuity-findings.js +27 -57
- package/dist/vacuity-findings.js.map +1 -1
- package/dist/violation.d.ts +22 -1
- package/dist/violation.d.ts.map +1 -1
- package/dist/violation.js.map +1 -1
- package/dist/watch.d.ts +71 -0
- package/dist/watch.d.ts.map +1 -0
- package/dist/watch.js +129 -0
- package/dist/watch.js.map +1 -0
- package/package.json +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"correspondence.js","sourceRoot":"","sources":["../src/correspondence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAsB,MAAM,uBAAuB,CAAA;AAC3E,OAAO,EAAE,eAAe,EAAqB,MAAM,eAAe,CAAA;AAClE,OAAO,EACL,uBAAuB,EACvB,kBAAkB,IAAI,uBAAuB,GAC9C,MAAM,kBAAkB,CAAA;AAyDzB,SAAS,YAAY,CAAC,IAAiB,EAAE,OAAe,EAAE,MAAe;IACvE,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,MAAM;QACN,OAAO,EAAE,IAAI,CAAC,IAAI;QAClB,IAAI,EAAE,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AAA;
|
|
1
|
+
{"version":3,"file":"dedupe-config-findings.d.ts","sourceRoot":"","sources":["../src/dedupe-config-findings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAenD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,GAAG,aAAa,EAAE,CAsC1F"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// The ids that are never collapsed — see `keyFor`. Imported rather than
|
|
2
|
+
// re-listed: `emitter-findings.ts` declares them and owns the set, so the next
|
|
3
|
+
// id is added in one place. A second local list here is how this guard would
|
|
4
|
+
// silently stop covering a fifth id.
|
|
5
|
+
import { EMITTER_IDS } from './emitter-findings.js';
|
|
1
6
|
/** How the surviving finding states the fan-out it stands for. */
|
|
2
7
|
function affectedNote(count) {
|
|
3
8
|
return (` This one option generated ${String(count)} rules that cannot enforce anything; they are ` +
|
|
@@ -69,6 +74,28 @@ function keyFor(violation) {
|
|
|
69
74
|
return undefined;
|
|
70
75
|
if (violation.element === '' || violation.element === 'unnamed')
|
|
71
76
|
return undefined;
|
|
77
|
+
// An emitter finding is about a VERDICT, not about a rule's narrowing, so the
|
|
78
|
+
// collapse's premise — one authored option fanned out by a preset — never
|
|
79
|
+
// holds for it. Each one stands for a different builder that hands back no
|
|
80
|
+
// evidence, and each is its own edit in its own place.
|
|
81
|
+
//
|
|
82
|
+
// It cannot be told apart by shape: `emitter-findings.ts` sets
|
|
83
|
+
// `element: ruleId` (the fault is the verdict, so there is no place in anyone's
|
|
84
|
+
// code to point at) and `file: ''`, so the key degenerates to `('' , id, id)`
|
|
85
|
+
// and every occurrence in a run merges. Measured before this guard: three
|
|
86
|
+
// hand-rolled builders in one rule file reported as ONE finding whose note said
|
|
87
|
+
// they were "one edit". They are three edits — the case 0069's appendix decides
|
|
88
|
+
// the other way ("two different `shared` entries that both match nothing are
|
|
89
|
+
// two findings, because they are two edits").
|
|
90
|
+
//
|
|
91
|
+
// **Keyed on the id set, not on the `element === identity` shape.** A first cut
|
|
92
|
+
// refused a key whenever the element repeated the identity, and that is too
|
|
93
|
+
// broad: a real rule with a real narrowing and no glob to name does the same,
|
|
94
|
+
// and two instances of it genuinely ARE one edit — `the-floor.test.ts`'s
|
|
95
|
+
// "CONTROL: genuinely identical findings still collapse" reds on it, over
|
|
96
|
+
// `smells.duplicateBodies(p).minLines(500)`.
|
|
97
|
+
if (EMITTER_IDS.has(identity))
|
|
98
|
+
return undefined;
|
|
72
99
|
return `${violation.file} ${identity} ${violation.element}`;
|
|
73
100
|
}
|
|
74
101
|
//# sourceMappingURL=dedupe-config-findings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dedupe-config-findings.js","sourceRoot":"","sources":["../src/dedupe-config-findings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dedupe-config-findings.js","sourceRoot":"","sources":["../src/dedupe-config-findings.ts"],"names":[],"mappings":"AAgDA,wEAAwE;AACxE,+EAA+E;AAC/E,6EAA6E;AAC7E,qCAAqC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,kEAAkE;AAClE,SAAS,YAAY,CAAC,KAAa;IACjC,OAAO,CACL,8BAA8B,MAAM,CAAC,KAAK,CAAC,gDAAgD;QAC3F,kDAAkD,CACnD,CAAA;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAoC;IACvE,6EAA6E;IAC7E,8EAA8E;IAC9E,cAAc;IACd,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAA;IACxC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;QAC7B,IAAI,GAAG,KAAK,SAAS;YAAE,SAA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A;IACtD,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,IAAI,CAAA;IACnD,+EAA+E;IAC/E,8EAA8E;IAC9E,2EAA2E;IAC3E,0EAA0E;IAC1E,4EAA4E;IAC5E,wEAAwE;IACxE,IAAI,QAAQ,KAAK,EAAE,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IAC/D,IAAI,SAAS,CAAC,OAAO,KAAK,EAAE,IAAI,SAAS,CAAC,OAAO,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IACjF,8EAA8E;IAC9E,0EAA0E;IAC1E,2EAA2E;IAC3E,uDAAuD;IACvD,EAAE;IACF,+DAA+D;IAC/D,gFAAgF;IAChF,8EAA8E;IAC9E,0EAA0E;IAC1E,gFAAgF;IAChF,gFAAgF;IAChF,6EAA6E;IAC7E,8CAA8C;IAC9C,EAAE;IACF,gFAAgF;IAChF,4EAA4E;IAC5E,8EAA8E;IAC9E,yEAAyE;IACzE,0EAA0E;IAC1E,6CAA6C;IAC7C,IAAI,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC;QAAE,OAAO,SAAS,CAAA;IAC/C,OAAO,GAAG,SAAS,CAAC,IAAI,IAAI,QAAQ,IAAI,SAAS,CAAC,OAAO,EAAE,CAAA;AAC7D,CAAC"}
|
package/dist/diff-aware.d.ts
CHANGED
|
@@ -10,18 +10,17 @@ import type { ArchViolation } from './violation.js';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class DiffFilter {
|
|
12
12
|
private readonly changedFiles;
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The branch this filter diffed against, for the suppression notice plan
|
|
15
|
+
* 0071 added. Defaulted rather than required: the constructor is public API
|
|
16
|
+
* (`src/index.ts` exports `DiffFilter`), so an existing
|
|
17
|
+
* `new DiffFilter(files)` must keep compiling.
|
|
18
|
+
*/
|
|
19
|
+
readonly baseBranch: string;
|
|
20
|
+
constructor(changedFiles: Set<string> | null, baseBranch?: string);
|
|
14
21
|
/**
|
|
15
22
|
* Filter violations to only those in changed files.
|
|
16
23
|
* If changedFiles is null (git error), returns all violations unfiltered.
|
|
17
|
-
*
|
|
18
|
-
* A `bypassFilters` configuration finding (ADR-010's zero-examined /
|
|
19
|
-
* expired-`.expectEmpty()` violations) is never filtered here, even
|
|
20
|
-
* though its `file` is always `''` and can never be a member of
|
|
21
|
-
* `changedFiles`. Without this, "unsuppressable" was false for the most
|
|
22
|
-
* realistic adoption path: a rule whose instrument silently broke would
|
|
23
|
-
* report nothing at all under `--changed`, with no diagnostic that
|
|
24
|
-
* anything was ever hidden.
|
|
25
24
|
*/
|
|
26
25
|
filterToChanged(violations: ArchViolation[]): ArchViolation[];
|
|
27
26
|
/** Number of changed files detected, or -1 if diff unavailable */
|
package/dist/diff-aware.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-aware.d.ts","sourceRoot":"","sources":["../src/diff-aware.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAGnD;;;;;;;;GAQG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoB;
|
|
1
|
+
{"version":3,"file":"diff-aware.d.ts","sourceRoot":"","sources":["../src/diff-aware.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAGnD;;;;;;;;GAQG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoB;IAEjD;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;gBAEf,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,UAAU,GAAE,MAA0B;IAKpF;;;OAGG;IACH,eAAe,CAAC,UAAU,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE;IA0B7D,kEAAkE;IAClE,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,UAAU,GAAE,MAAe,GAAG,UAAU,CAiCjE"}
|
package/dist/diff-aware.js
CHANGED
|
@@ -12,26 +12,43 @@ import { writeStderr } from './stderr.js';
|
|
|
12
12
|
*/
|
|
13
13
|
export class DiffFilter {
|
|
14
14
|
changedFiles;
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* The branch this filter diffed against, for the suppression notice plan
|
|
17
|
+
* 0071 added. Defaulted rather than required: the constructor is public API
|
|
18
|
+
* (`src/index.ts` exports `DiffFilter`), so an existing
|
|
19
|
+
* `new DiffFilter(files)` must keep compiling.
|
|
20
|
+
*/
|
|
21
|
+
baseBranch;
|
|
22
|
+
constructor(changedFiles, baseBranch = 'the base branch') {
|
|
16
23
|
this.changedFiles = changedFiles;
|
|
24
|
+
this.baseBranch = baseBranch;
|
|
17
25
|
}
|
|
18
26
|
/**
|
|
19
27
|
* Filter violations to only those in changed files.
|
|
20
28
|
* If changedFiles is null (git error), returns all violations unfiltered.
|
|
21
|
-
*
|
|
22
|
-
* A `bypassFilters` configuration finding (ADR-010's zero-examined /
|
|
23
|
-
* expired-`.expectEmpty()` violations) is never filtered here, even
|
|
24
|
-
* though its `file` is always `''` and can never be a member of
|
|
25
|
-
* `changedFiles`. Without this, "unsuppressable" was false for the most
|
|
26
|
-
* realistic adoption path: a rule whose instrument silently broke would
|
|
27
|
-
* report nothing at all under `--changed`, with no diagnostic that
|
|
28
|
-
* anything was ever hidden.
|
|
29
29
|
*/
|
|
30
30
|
filterToChanged(violations) {
|
|
31
31
|
const files = this.changedFiles;
|
|
32
32
|
if (files === null)
|
|
33
33
|
return violations;
|
|
34
|
-
|
|
34
|
+
// Config-level meta-findings (empty selector/discovery) have no changed file
|
|
35
|
+
// to attribute to — never filter them out (ADR-008; plan 0067).
|
|
36
|
+
//
|
|
37
|
+
// Kept from the kernel's copy when the two were unified, because it is the
|
|
38
|
+
// half that says WHY: a `bypassFilters` configuration finding (ADR-010's
|
|
39
|
+
// zero-examined / expired-`.expectEmpty()` violations) has `file: ''` and can
|
|
40
|
+
// never be a member of `changedFiles`. Without this branch, "unsuppressable"
|
|
41
|
+
// was false for the most realistic adoption path — a rule whose instrument
|
|
42
|
+
// silently broke reported nothing at all under `--changed`, with no
|
|
43
|
+
// diagnostic that anything had been hidden.
|
|
44
|
+
// `relatedFiles` (bug 0239): a finding about a RELATIONSHIP concerns several
|
|
45
|
+
// files and can only be reported at one of them. Keeping it when any of them
|
|
46
|
+
// changed is what makes `--changed` honest for it — the alternative measured
|
|
47
|
+
// in 0239 was that the developer who introduced a duplicate saw nothing,
|
|
48
|
+
// because the finding was anchored on the file they had not edited.
|
|
49
|
+
return violations.filter((v) => v.bypassFilters === true ||
|
|
50
|
+
files.has(v.file) ||
|
|
51
|
+
(v.relatedFiles?.some((f) => files.has(f)) ?? false));
|
|
35
52
|
}
|
|
36
53
|
/** Number of changed files detected, or -1 if diff unavailable */
|
|
37
54
|
get size() {
|
|
@@ -62,17 +79,21 @@ export function diffAware(baseBranch = 'main') {
|
|
|
62
79
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
63
80
|
}).trim();
|
|
64
81
|
}
|
|
65
|
-
catch (
|
|
66
|
-
// Not a git repo, or base branch doesn't exist — skip filtering (report
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
82
|
+
catch (error) {
|
|
83
|
+
// Not a git repo, or the base branch doesn't exist — skip filtering (report
|
|
84
|
+
// all violations). The cause is named: "could not run git diff" alone sends
|
|
85
|
+
// a reader looking for a missing branch when the real answer may be that git
|
|
86
|
+
// is not installed, or that the cwd is not a repository at all.
|
|
87
|
+
writeStderr(`[eess] Could not run git diff against '${baseBranch}' ` +
|
|
88
|
+
`(${error instanceof Error ? error.message.split('\n')[0] : String(error)}). ` +
|
|
89
|
+
'All violations will be reported.');
|
|
90
|
+
return new DiffFilter(null, baseBranch);
|
|
70
91
|
}
|
|
71
92
|
if (output === '') {
|
|
72
93
|
// No changes — empty set means nothing is "changed", so all violations are filtered out
|
|
73
|
-
return new DiffFilter(new Set());
|
|
94
|
+
return new DiffFilter(new Set(), baseBranch);
|
|
74
95
|
}
|
|
75
96
|
const changedFiles = new Set(output.split('\n').map((relativePath) => path.resolve(cwd, relativePath)));
|
|
76
|
-
return new DiffFilter(changedFiles);
|
|
97
|
+
return new DiffFilter(changedFiles, baseBranch);
|
|
77
98
|
}
|
|
78
99
|
//# sourceMappingURL=diff-aware.js.map
|
package/dist/diff-aware.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-aware.js","sourceRoot":"","sources":["../src/diff-aware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;;;;;;;GAQG;AACH,MAAM,OAAO,UAAU;IACJ,YAAY,CAAoB;IAEjD,YAAY,YAAgC;
|
|
1
|
+
{"version":3,"file":"diff-aware.js","sourceRoot":"","sources":["../src/diff-aware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;;;;;;;GAQG;AACH,MAAM,OAAO,UAAU;IACJ,YAAY,CAAoB;IAEjD;;;;;OAKG;IACM,UAAU,CAAQ;IAE3B,YAAY,YAAgC,EAAE,aAAqB,iBAAiB;QAClF,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;QAChC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;IAED;;;OAGG;IACH,eAAe,CAAC,UAA2B;QACzC,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAA;QAC/B,IAA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EAA6E;QAC7E,gEAAgE;QAChE,WAAW,CACT,0CAA0C,UAAU,IAAI;YACtD,IAAI,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK;YAC9E,kCAAkC,CACrC,CAAA;QACD,OAAO,IAAI,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IACzC,CAAC;IAED,IAAI,MAAM,KAAK,EAAE,EAAE,CAAC;QAClB,wFAAwF;QACxF,OAAO,IAAI,UAAU,CAAC,IAAI,GAAG,EAAE,EAAE,UAAU,CAAC,CAAA;IAC9C,CAAC;IAED,MAAM,YAAY,GAAG,IAAI,GAAG,CAC1B,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,CAC1E,CAAA;IAED,OAAO,IAAI,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;AACjD,CAAC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { ArchViolation } from './violation.js';
|
|
2
|
+
/**
|
|
3
|
+
* The emitter's own configuration findings — [ADR-014](../../../adr/014-the-emitter-refuses-a-verdict-without-evidence.md).
|
|
4
|
+
*
|
|
5
|
+
* **Why these are not in `vacuity-findings.ts`.** Every finding there is built by
|
|
6
|
+
* `configFinding(facts, message)`, which reads its `ruleId` from
|
|
7
|
+
* `facts.describeRule()`. At the emitter there is no rule to describe: the value
|
|
8
|
+
* arrived from a preset, a loop, or a hand-assembled array, and the whole point
|
|
9
|
+
* of ADR-014 is that the emitter must speak about values it did not mint.
|
|
10
|
+
*
|
|
11
|
+
* That is not a stylistic difference, it is bug 0190's cause. The kernel's
|
|
12
|
+
* previous preset finding took `(presetName, optionsHint)` and carried **no
|
|
13
|
+
* `ruleId`**, so nothing could assert on it and no non-vacuity fixture could key
|
|
14
|
+
* on it — a finding no test could name is a finding no one can prove fires. It
|
|
15
|
+
* had no call site and was deleted rather than wired (plan 0235 Phase 0). These
|
|
16
|
+
* two carry **hardcoded, stable ids**, and they are the first hardcoded rule ids
|
|
17
|
+
* in the kernel for exactly that reason.
|
|
18
|
+
*
|
|
19
|
+
* **Why two and not one.** ADR-014 §4 separates them, and the remedies differ:
|
|
20
|
+
*
|
|
21
|
+
* - `emitter/no-receipt` — the value carried no evidence field at all. A shape
|
|
22
|
+
* defect. The remedy ("hand over what the pipeline minted") is real on every
|
|
23
|
+
* path, including one where the run was perfectly healthy.
|
|
24
|
+
* - `emitter/pass-without-evidence` — the value carried evidence, and it says
|
|
25
|
+
* zero examined with zero violations and no declaration. A vacuous pass. The
|
|
26
|
+
* remedy is about the selection, not the shape.
|
|
27
|
+
*
|
|
28
|
+
* Folding them into one id would make the fixture for either satisfiable by the
|
|
29
|
+
* other, which is the discrimination failure `check:nonvacuity` exists to catch.
|
|
30
|
+
*
|
|
31
|
+
* **What the kernel may say.** ADR-014 §4 is explicit that the kernel "never
|
|
32
|
+
* names a preset's options at a seam that may not be a preset": a preset that
|
|
33
|
+
* constructed zero rules owns its own remedy and names it before handing over.
|
|
34
|
+
* So these messages speak only about the value and the loop that produced it —
|
|
35
|
+
* the vocabulary any hand-assembler can act on.
|
|
36
|
+
*
|
|
37
|
+
* **`expectEmpty` is not an exception to that, it is the reason for the rule's
|
|
38
|
+
* shape.** It lives on the KERNEL's own `PresetReportOptions`, so naming it
|
|
39
|
+
* names this package's surface rather than a dialect's — and a product review
|
|
40
|
+
* found the vacuous-pass message, the one most likely to red an adopter's
|
|
41
|
+
* build, told them to "declare the set legitimately empty" without saying how.
|
|
42
|
+
* A remedy an author cannot act on is ADR-009 rule 2's failure, and it sends
|
|
43
|
+
* them to the one escape the message forbids in its next clause.
|
|
44
|
+
*/
|
|
45
|
+
/** The value handed to an emitter carried no evidence field at all. */
|
|
46
|
+
export declare const EMITTER_NO_RECEIPT = "emitter/no-receipt";
|
|
47
|
+
/** Zero examined, zero violations, no declaration — a pass built from nothing. */
|
|
48
|
+
export declare const EMITTER_PASS_WITHOUT_EVIDENCE = "emitter/pass-without-evidence";
|
|
49
|
+
/**
|
|
50
|
+
* A declaration that has expired: declared empty, then examined something.
|
|
51
|
+
*
|
|
52
|
+
* **This is what makes a declaration legitimate at all.** ADR-010 §3 admits
|
|
53
|
+
* `.expectEmpty()` precisely because it "fails the day it stops being true" —
|
|
54
|
+
* a claim that can never be contradicted is not an assertion, and the whole
|
|
55
|
+
* 2026-09-05 amendment to ADR-014 §3 turns on that property. Without this
|
|
56
|
+
* finding the emitter would accept a declaration nothing can ever falsify,
|
|
57
|
+
* which is the shape that amendment refused for `overrides: 'off'`.
|
|
58
|
+
*/
|
|
59
|
+
export declare const EMITTER_EXPIRED_DECLARATION = "emitter/expired-declaration";
|
|
60
|
+
/**
|
|
61
|
+
* A receipt that claims it never ran, and carries evidence that it did.
|
|
62
|
+
*
|
|
63
|
+
* **The falsifier `notRun` was shipped without.** `declaredEmpty` has one — the
|
|
64
|
+
* expiry above — and that property is the entire reason ADR-010 §3 admits a
|
|
65
|
+
* declaration at all. `notRun` suppresses too: it is the one condition that
|
|
66
|
+
* excludes a member from `mergeCollectResults`'s dead-member filter, so a zero
|
|
67
|
+
* marked `notRun` is a zero the merge will not complain about. A suppressor with
|
|
68
|
+
* no contradiction is exactly the shape ADR-014 §3's amendment refuses, and
|
|
69
|
+
* shipping one inside the change that establishes the rule is the defect an
|
|
70
|
+
* enforcement review caught here.
|
|
71
|
+
*
|
|
72
|
+
* A rule that never ran examined nothing and found nothing. Both halves are
|
|
73
|
+
* checked, because either alone is a lie the other does not cover: `examined > 0`
|
|
74
|
+
* is a denominator that could not exist, and a violation is a finding that could
|
|
75
|
+
* not have been produced.
|
|
76
|
+
*/
|
|
77
|
+
export declare const EMITTER_CONTRADICTORY_EVIDENCE = "emitter/contradictory-evidence";
|
|
78
|
+
/**
|
|
79
|
+
* The verdict's own source loaded nothing — ADR-014 §4.
|
|
80
|
+
*
|
|
81
|
+
* Distinct from `emitter/pass-without-evidence`, and the distinction is the
|
|
82
|
+
* point: a zero-examined verdict *may* be legitimate if the caller declares the
|
|
83
|
+
* emptiness, but an empty SOURCE may not. §4 states the precedence — "an empty
|
|
84
|
+
* source (`sourceEmpty`) outranks any declaration and names the source" — and
|
|
85
|
+
* ADR-010 §3 carries the same rule at the terminal as a `gated` row.
|
|
86
|
+
*
|
|
87
|
+
* The gate honoured `declaredEmpty` before it ever looked at `sourceEmpty`, so a
|
|
88
|
+
* hand-assembled receipt setting both passed silently: the escape hatch the
|
|
89
|
+
* comment beside that branch said this ADR had closed. Measured before the fix,
|
|
90
|
+
* `finishPreset(collectResult([], { examined: 0, sourceEmpty: true, declaredEmpty: true }))`
|
|
91
|
+
* returned green.
|
|
92
|
+
*/
|
|
93
|
+
export declare const EMITTER_SOURCE_EMPTY = "emitter/source-empty";
|
|
94
|
+
/**
|
|
95
|
+
* Every id this module can produce.
|
|
96
|
+
*
|
|
97
|
+
* One list, because there were two: `report.ts` had a four-way `||` and
|
|
98
|
+
* `dedupe-config-findings.ts` grew a second `Set` of the same four. Both are
|
|
99
|
+
* private, neither knew about the other, and a fifth id added to one and not the
|
|
100
|
+
* other silently reintroduces the defect the second was written to fix — N
|
|
101
|
+
* distinct dead builders collapsing into one finding annotated "they are one
|
|
102
|
+
* edit". The argument for naming the constants rather than testing an `emitter/`
|
|
103
|
+
* prefix only holds if there is ONE place to add the next one.
|
|
104
|
+
*
|
|
105
|
+
* Internal: exported for the kernel's own consumers, not on the root surface.
|
|
106
|
+
*/
|
|
107
|
+
export declare const EMITTER_IDS: ReadonlySet<string>;
|
|
108
|
+
/** Is this one of the emitter's own findings, as opposed to a caller's? */
|
|
109
|
+
export declare function isEmitterFinding(violation: {
|
|
110
|
+
ruleId?: string;
|
|
111
|
+
rule?: string;
|
|
112
|
+
}): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* The source loaded nothing, so no declaration can rescue the verdict.
|
|
115
|
+
*
|
|
116
|
+
* Names the SOURCE, per ADR-014 §4, and says so explicitly — the remedy is to
|
|
117
|
+
* fix the project or glob, never to declare the emptiness, and a reader told to
|
|
118
|
+
* "declare it" here would be sent to the one thing that cannot work. The
|
|
119
|
+
* terminal's `zeroLoadedSourceViolation` says the same thing in the same words;
|
|
120
|
+
* this is its emitter-seam sibling, for a receipt with no rule facts to carry.
|
|
121
|
+
*/
|
|
122
|
+
export declare function sourceEmptyViolation(): ArchViolation;
|
|
123
|
+
/**
|
|
124
|
+
* A value reached an emitter with no evidence at all — a bare array, or an
|
|
125
|
+
* object with no `examined`.
|
|
126
|
+
*
|
|
127
|
+
* This fires even when the run was healthy and found real violations, because
|
|
128
|
+
* the defect is that the verdict cannot be checked, not that it is wrong. That
|
|
129
|
+
* is deliberate: a shape that *sometimes* carries evidence is a shape nobody can
|
|
130
|
+
* rely on, and the one path where it matters most is the path where the loop
|
|
131
|
+
* examined nothing.
|
|
132
|
+
*/
|
|
133
|
+
export declare function noReceiptViolation(): ArchViolation;
|
|
134
|
+
/**
|
|
135
|
+
* A pass with evidence that proves nothing: zero examined, zero violations, no
|
|
136
|
+
* declaration.
|
|
137
|
+
*
|
|
138
|
+
* The remedy names the selection, never a preset's options — ADR-014 §4.
|
|
139
|
+
*/
|
|
140
|
+
export declare function passWithoutEvidenceViolation(): ArchViolation;
|
|
141
|
+
/**
|
|
142
|
+
* The declaration was true when written and is not true now.
|
|
143
|
+
*
|
|
144
|
+
* The mirror of the terminal's own `expiredExpectEmptyViolation`, at the seam a
|
|
145
|
+
* preset's declaration reaches (ADR-014 §3). The number IS the finding, so it
|
|
146
|
+
* is named.
|
|
147
|
+
*/
|
|
148
|
+
export declare function expiredDeclarationViolation(examined: number): ArchViolation;
|
|
149
|
+
/**
|
|
150
|
+
* `notRun` beside evidence of a run.
|
|
151
|
+
*
|
|
152
|
+
* The mirror of {@link expiredDeclarationViolation} for the third state. The
|
|
153
|
+
* numbers ARE the finding, so both are named: a caller debugging this needs to
|
|
154
|
+
* know which half contradicted the flag.
|
|
155
|
+
*/
|
|
156
|
+
/**
|
|
157
|
+
* A flag that quiets a zero, contradicted by the receipt's own evidence.
|
|
158
|
+
*
|
|
159
|
+
* **The flag is a parameter because the message names it.** It was hardcoded to
|
|
160
|
+
* `notRun`, and once `sourceEmpty` became contradictable too, a receipt claiming
|
|
161
|
+
* an empty source beside real evidence was told to "drop the notRun flag" — a
|
|
162
|
+
* flag nobody had set, and a remedy that cannot be applied. Four reviewers
|
|
163
|
+
* measured that on this branch's own headline scenario. ADR-009 rule 2: the
|
|
164
|
+
* finding names its cause, and the remedy remediates.
|
|
165
|
+
*/
|
|
166
|
+
export declare function contradictoryEvidenceViolation(examined: number, violations: number, flag?: 'notRun' | 'sourceEmpty'): ArchViolation;
|
|
167
|
+
//# sourceMappingURL=emitter-findings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emitter-findings.d.ts","sourceRoot":"","sources":["../src/emitter-findings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAGnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,uBAAuB,CAAA;AAEtD,kFAAkF;AAClF,eAAO,MAAM,6BAA6B,kCAAkC,CAAA;AAE5E;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B,gCAAgC,CAAA;AAExE;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,8BAA8B,mCAAmC,CAAA;AAE9E;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,yBAAyB,CAAA;AAE1D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,MAAM,CAM1C,CAAA;AAEF,2EAA2E;AAC3E,wBAAgB,gBAAgB,CAAC,SAAS,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAEvF;AAqBD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,IAAI,aAAa,CASpD;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,aAAa,CAkBlD;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,IAAI,aAAa,CAU5D;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,CAO3E;AAED;;;;;;GAMG;AACH;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE,QAAQ,GAAG,aAAwB,GACxC,aAAa,CAqBf"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { UNSUPPRESSABLE } from './unsuppressable.js';
|
|
2
|
+
/**
|
|
3
|
+
* The emitter's own configuration findings — [ADR-014](../../../adr/014-the-emitter-refuses-a-verdict-without-evidence.md).
|
|
4
|
+
*
|
|
5
|
+
* **Why these are not in `vacuity-findings.ts`.** Every finding there is built by
|
|
6
|
+
* `configFinding(facts, message)`, which reads its `ruleId` from
|
|
7
|
+
* `facts.describeRule()`. At the emitter there is no rule to describe: the value
|
|
8
|
+
* arrived from a preset, a loop, or a hand-assembled array, and the whole point
|
|
9
|
+
* of ADR-014 is that the emitter must speak about values it did not mint.
|
|
10
|
+
*
|
|
11
|
+
* That is not a stylistic difference, it is bug 0190's cause. The kernel's
|
|
12
|
+
* previous preset finding took `(presetName, optionsHint)` and carried **no
|
|
13
|
+
* `ruleId`**, so nothing could assert on it and no non-vacuity fixture could key
|
|
14
|
+
* on it — a finding no test could name is a finding no one can prove fires. It
|
|
15
|
+
* had no call site and was deleted rather than wired (plan 0235 Phase 0). These
|
|
16
|
+
* two carry **hardcoded, stable ids**, and they are the first hardcoded rule ids
|
|
17
|
+
* in the kernel for exactly that reason.
|
|
18
|
+
*
|
|
19
|
+
* **Why two and not one.** ADR-014 §4 separates them, and the remedies differ:
|
|
20
|
+
*
|
|
21
|
+
* - `emitter/no-receipt` — the value carried no evidence field at all. A shape
|
|
22
|
+
* defect. The remedy ("hand over what the pipeline minted") is real on every
|
|
23
|
+
* path, including one where the run was perfectly healthy.
|
|
24
|
+
* - `emitter/pass-without-evidence` — the value carried evidence, and it says
|
|
25
|
+
* zero examined with zero violations and no declaration. A vacuous pass. The
|
|
26
|
+
* remedy is about the selection, not the shape.
|
|
27
|
+
*
|
|
28
|
+
* Folding them into one id would make the fixture for either satisfiable by the
|
|
29
|
+
* other, which is the discrimination failure `check:nonvacuity` exists to catch.
|
|
30
|
+
*
|
|
31
|
+
* **What the kernel may say.** ADR-014 §4 is explicit that the kernel "never
|
|
32
|
+
* names a preset's options at a seam that may not be a preset": a preset that
|
|
33
|
+
* constructed zero rules owns its own remedy and names it before handing over.
|
|
34
|
+
* So these messages speak only about the value and the loop that produced it —
|
|
35
|
+
* the vocabulary any hand-assembler can act on.
|
|
36
|
+
*
|
|
37
|
+
* **`expectEmpty` is not an exception to that, it is the reason for the rule's
|
|
38
|
+
* shape.** It lives on the KERNEL's own `PresetReportOptions`, so naming it
|
|
39
|
+
* names this package's surface rather than a dialect's — and a product review
|
|
40
|
+
* found the vacuous-pass message, the one most likely to red an adopter's
|
|
41
|
+
* build, told them to "declare the set legitimately empty" without saying how.
|
|
42
|
+
* A remedy an author cannot act on is ADR-009 rule 2's failure, and it sends
|
|
43
|
+
* them to the one escape the message forbids in its next clause.
|
|
44
|
+
*/
|
|
45
|
+
/** The value handed to an emitter carried no evidence field at all. */
|
|
46
|
+
export const EMITTER_NO_RECEIPT = 'emitter/no-receipt';
|
|
47
|
+
/** Zero examined, zero violations, no declaration — a pass built from nothing. */
|
|
48
|
+
export const EMITTER_PASS_WITHOUT_EVIDENCE = 'emitter/pass-without-evidence';
|
|
49
|
+
/**
|
|
50
|
+
* A declaration that has expired: declared empty, then examined something.
|
|
51
|
+
*
|
|
52
|
+
* **This is what makes a declaration legitimate at all.** ADR-010 §3 admits
|
|
53
|
+
* `.expectEmpty()` precisely because it "fails the day it stops being true" —
|
|
54
|
+
* a claim that can never be contradicted is not an assertion, and the whole
|
|
55
|
+
* 2026-09-05 amendment to ADR-014 §3 turns on that property. Without this
|
|
56
|
+
* finding the emitter would accept a declaration nothing can ever falsify,
|
|
57
|
+
* which is the shape that amendment refused for `overrides: 'off'`.
|
|
58
|
+
*/
|
|
59
|
+
export const EMITTER_EXPIRED_DECLARATION = 'emitter/expired-declaration';
|
|
60
|
+
/**
|
|
61
|
+
* A receipt that claims it never ran, and carries evidence that it did.
|
|
62
|
+
*
|
|
63
|
+
* **The falsifier `notRun` was shipped without.** `declaredEmpty` has one — the
|
|
64
|
+
* expiry above — and that property is the entire reason ADR-010 §3 admits a
|
|
65
|
+
* declaration at all. `notRun` suppresses too: it is the one condition that
|
|
66
|
+
* excludes a member from `mergeCollectResults`'s dead-member filter, so a zero
|
|
67
|
+
* marked `notRun` is a zero the merge will not complain about. A suppressor with
|
|
68
|
+
* no contradiction is exactly the shape ADR-014 §3's amendment refuses, and
|
|
69
|
+
* shipping one inside the change that establishes the rule is the defect an
|
|
70
|
+
* enforcement review caught here.
|
|
71
|
+
*
|
|
72
|
+
* A rule that never ran examined nothing and found nothing. Both halves are
|
|
73
|
+
* checked, because either alone is a lie the other does not cover: `examined > 0`
|
|
74
|
+
* is a denominator that could not exist, and a violation is a finding that could
|
|
75
|
+
* not have been produced.
|
|
76
|
+
*/
|
|
77
|
+
export const EMITTER_CONTRADICTORY_EVIDENCE = 'emitter/contradictory-evidence';
|
|
78
|
+
/**
|
|
79
|
+
* The verdict's own source loaded nothing — ADR-014 §4.
|
|
80
|
+
*
|
|
81
|
+
* Distinct from `emitter/pass-without-evidence`, and the distinction is the
|
|
82
|
+
* point: a zero-examined verdict *may* be legitimate if the caller declares the
|
|
83
|
+
* emptiness, but an empty SOURCE may not. §4 states the precedence — "an empty
|
|
84
|
+
* source (`sourceEmpty`) outranks any declaration and names the source" — and
|
|
85
|
+
* ADR-010 §3 carries the same rule at the terminal as a `gated` row.
|
|
86
|
+
*
|
|
87
|
+
* The gate honoured `declaredEmpty` before it ever looked at `sourceEmpty`, so a
|
|
88
|
+
* hand-assembled receipt setting both passed silently: the escape hatch the
|
|
89
|
+
* comment beside that branch said this ADR had closed. Measured before the fix,
|
|
90
|
+
* `finishPreset(collectResult([], { examined: 0, sourceEmpty: true, declaredEmpty: true }))`
|
|
91
|
+
* returned green.
|
|
92
|
+
*/
|
|
93
|
+
export const EMITTER_SOURCE_EMPTY = 'emitter/source-empty';
|
|
94
|
+
/**
|
|
95
|
+
* Every id this module can produce.
|
|
96
|
+
*
|
|
97
|
+
* One list, because there were two: `report.ts` had a four-way `||` and
|
|
98
|
+
* `dedupe-config-findings.ts` grew a second `Set` of the same four. Both are
|
|
99
|
+
* private, neither knew about the other, and a fifth id added to one and not the
|
|
100
|
+
* other silently reintroduces the defect the second was written to fix — N
|
|
101
|
+
* distinct dead builders collapsing into one finding annotated "they are one
|
|
102
|
+
* edit". The argument for naming the constants rather than testing an `emitter/`
|
|
103
|
+
* prefix only holds if there is ONE place to add the next one.
|
|
104
|
+
*
|
|
105
|
+
* Internal: exported for the kernel's own consumers, not on the root surface.
|
|
106
|
+
*/
|
|
107
|
+
export const EMITTER_IDS = new Set([
|
|
108
|
+
EMITTER_NO_RECEIPT,
|
|
109
|
+
EMITTER_PASS_WITHOUT_EVIDENCE,
|
|
110
|
+
EMITTER_EXPIRED_DECLARATION,
|
|
111
|
+
EMITTER_CONTRADICTORY_EVIDENCE,
|
|
112
|
+
EMITTER_SOURCE_EMPTY,
|
|
113
|
+
]);
|
|
114
|
+
/** Is this one of the emitter's own findings, as opposed to a caller's? */
|
|
115
|
+
export function isEmitterFinding(violation) {
|
|
116
|
+
return EMITTER_IDS.has(violation.ruleId ?? violation.rule ?? '');
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Shared shape. `file: ''` / `line: 0` for the same reason `vacuity-findings.ts`
|
|
120
|
+
* uses them: the fault is the verdict, not a place in anyone's code.
|
|
121
|
+
* `bypassFilters` because a suppression mechanism that can suppress the
|
|
122
|
+
* complaint about itself is not a mechanism.
|
|
123
|
+
*/
|
|
124
|
+
function emitterFinding(ruleId, message) {
|
|
125
|
+
return {
|
|
126
|
+
rule: ruleId,
|
|
127
|
+
ruleId,
|
|
128
|
+
element: ruleId,
|
|
129
|
+
file: '',
|
|
130
|
+
line: 0,
|
|
131
|
+
message,
|
|
132
|
+
suggestion: `${message} ${UNSUPPRESSABLE}`,
|
|
133
|
+
bypassFilters: true,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The source loaded nothing, so no declaration can rescue the verdict.
|
|
138
|
+
*
|
|
139
|
+
* Names the SOURCE, per ADR-014 §4, and says so explicitly — the remedy is to
|
|
140
|
+
* fix the project or glob, never to declare the emptiness, and a reader told to
|
|
141
|
+
* "declare it" here would be sent to the one thing that cannot work. The
|
|
142
|
+
* terminal's `zeroLoadedSourceViolation` says the same thing in the same words;
|
|
143
|
+
* this is its emitter-seam sibling, for a receipt with no rule facts to carry.
|
|
144
|
+
*/
|
|
145
|
+
export function sourceEmptyViolation() {
|
|
146
|
+
return emitterFinding(EMITTER_SOURCE_EMPTY, 'this verdict reports success over a source that loaded zero units before any ' +
|
|
147
|
+
'selection ran — an empty project, an unreadable config, or a glob resolving to ' +
|
|
148
|
+
'nothing. This outranks any declaration: declaring the emptiness cannot make an ' +
|
|
149
|
+
'absent source into evidence. Fix the source configuration — the project, the ' +
|
|
150
|
+
'tsconfig, or the glob — not the declaration.');
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* A value reached an emitter with no evidence at all — a bare array, or an
|
|
154
|
+
* object with no `examined`.
|
|
155
|
+
*
|
|
156
|
+
* This fires even when the run was healthy and found real violations, because
|
|
157
|
+
* the defect is that the verdict cannot be checked, not that it is wrong. That
|
|
158
|
+
* is deliberate: a shape that *sometimes* carries evidence is a shape nobody can
|
|
159
|
+
* rely on, and the one path where it matters most is the path where the loop
|
|
160
|
+
* examined nothing.
|
|
161
|
+
*/
|
|
162
|
+
export function noReceiptViolation() {
|
|
163
|
+
return emitterFinding(EMITTER_NO_RECEIPT, 'this verdict arrived with no evidence of what was examined, so eess cannot tell a ' +
|
|
164
|
+
'clean run from a loop that never ran. Hand the emitter what the pipeline minted — ' +
|
|
165
|
+
"a builder's violations(), or a preset's result — rather than an array assembled by hand. " +
|
|
166
|
+
// Naming the call, because the audience changed. This message was written
|
|
167
|
+
// for someone calling `finishPreset([])` directly; since plan 0263 Phase 2
|
|
168
|
+
// it is also what a rule-file author meets, and THEIR builder is the thing
|
|
169
|
+
// returning the array — so "hand the emitter a builder's violations()"
|
|
170
|
+
// describes what they already did. The changeset's migration line was the
|
|
171
|
+
// actionable one and lived only in the changelog. `collectResult` and
|
|
172
|
+
// `mergeCollectResults` are kernel root exports, re-exported by the
|
|
173
|
+
// dialects, so naming them costs an adopter no second install.
|
|
174
|
+
'If you are writing the builder: return collectResult(violations, { examined }) ' +
|
|
175
|
+
'instead of a plain array, where `examined` is how many units you actually ' +
|
|
176
|
+
'looked at. If you are combining builders, use mergeCollectResults([...]).');
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* A pass with evidence that proves nothing: zero examined, zero violations, no
|
|
180
|
+
* declaration.
|
|
181
|
+
*
|
|
182
|
+
* The remedy names the selection, never a preset's options — ADR-014 §4.
|
|
183
|
+
*/
|
|
184
|
+
export function passWithoutEvidenceViolation() {
|
|
185
|
+
return emitterFinding(EMITTER_PASS_WITHOUT_EVIDENCE, 'this verdict reports success over zero examined units: the loop reached its ' +
|
|
186
|
+
'assertion no times, so nothing was checked and the pass certifies nothing. Widen ' +
|
|
187
|
+
'the selection, or — if the set is legitimately empty — declare it on the receipt: ' +
|
|
188
|
+
'collectResult(violations, { examined, declaredEmpty: true }), or .expectEmpty() ' +
|
|
189
|
+
'on a builder. The declaration expires the day the subject appears, which is why ' +
|
|
190
|
+
'it is not a mute button. Do not suppress this.');
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* The declaration was true when written and is not true now.
|
|
194
|
+
*
|
|
195
|
+
* The mirror of the terminal's own `expiredExpectEmptyViolation`, at the seam a
|
|
196
|
+
* preset's declaration reaches (ADR-014 §3). The number IS the finding, so it
|
|
197
|
+
* is named.
|
|
198
|
+
*/
|
|
199
|
+
export function expiredDeclarationViolation(examined) {
|
|
200
|
+
return emitterFinding(EMITTER_EXPIRED_DECLARATION, `this verdict was declared empty but examined ${String(examined)} unit(s) — the ` +
|
|
201
|
+
'declaration has expired. If the set legitimately grew past empty, remove the ' +
|
|
202
|
+
'declaration; the violations above (if any) still stand.');
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* `notRun` beside evidence of a run.
|
|
206
|
+
*
|
|
207
|
+
* The mirror of {@link expiredDeclarationViolation} for the third state. The
|
|
208
|
+
* numbers ARE the finding, so both are named: a caller debugging this needs to
|
|
209
|
+
* know which half contradicted the flag.
|
|
210
|
+
*/
|
|
211
|
+
/**
|
|
212
|
+
* A flag that quiets a zero, contradicted by the receipt's own evidence.
|
|
213
|
+
*
|
|
214
|
+
* **The flag is a parameter because the message names it.** It was hardcoded to
|
|
215
|
+
* `notRun`, and once `sourceEmpty` became contradictable too, a receipt claiming
|
|
216
|
+
* an empty source beside real evidence was told to "drop the notRun flag" — a
|
|
217
|
+
* flag nobody had set, and a remedy that cannot be applied. Four reviewers
|
|
218
|
+
* measured that on this branch's own headline scenario. ADR-009 rule 2: the
|
|
219
|
+
* finding names its cause, and the remedy remediates.
|
|
220
|
+
*/
|
|
221
|
+
export function contradictoryEvidenceViolation(examined, violations, flag = 'notRun') {
|
|
222
|
+
const claim = flag === 'notRun'
|
|
223
|
+
? 'is marked as never having run'
|
|
224
|
+
: 'is marked as having loaded no source at all';
|
|
225
|
+
const why = flag === 'notRun'
|
|
226
|
+
? 'a rule that did not run can have neither'
|
|
227
|
+
: 'a source that loaded nothing can yield neither';
|
|
228
|
+
const remedy = flag === 'notRun'
|
|
229
|
+
? 'Drop the notRun flag if the rule ran, or drop the evidence if it did not; ' +
|
|
230
|
+
'notRun exists for a rule turned off, not for one whose result you want quiet.'
|
|
231
|
+
: 'Drop the sourceEmpty flag if the source loaded, or drop the evidence if it did ' +
|
|
232
|
+
'not; sourceEmpty describes an instrument that read nothing, not a result you ' +
|
|
233
|
+
'want quiet.';
|
|
234
|
+
return emitterFinding(EMITTER_CONTRADICTORY_EVIDENCE, `this verdict ${claim}, but examined ${String(examined)} unit(s) ` +
|
|
235
|
+
`and carries ${String(violations)} violation(s) — ${why}. ${remedy}`);
|
|
236
|
+
}
|
|
237
|
+
//# sourceMappingURL=emitter-findings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emitter-findings.js","sourceRoot":"","sources":["../src/emitter-findings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,uEAAuE;AACvE,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAA;AAEtD,kFAAkF;AAClF,MAAM,CAAC,MAAM,6BAA6B,GAAG,+BAA+B,CAAA;AAE5E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,6BAA6B,CAAA;AAExE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,gCAAgC,CAAA;AAE9E;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAA;AAE1D;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC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