@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.
Files changed (125) hide show
  1. package/README.md +94 -1
  2. package/dist/baseline-generator.d.ts +9 -0
  3. package/dist/baseline-generator.d.ts.map +1 -1
  4. package/dist/baseline-generator.js +9 -0
  5. package/dist/baseline-generator.js.map +1 -1
  6. package/dist/baseline.d.ts +1 -1
  7. package/dist/cardinality.d.ts.map +1 -1
  8. package/dist/cardinality.js +20 -5
  9. package/dist/cardinality.js.map +1 -1
  10. package/dist/cli-config.d.ts +106 -0
  11. package/dist/cli-config.d.ts.map +1 -0
  12. package/dist/cli-config.js +231 -0
  13. package/dist/cli-config.js.map +1 -0
  14. package/dist/collect-result.d.ts +94 -0
  15. package/dist/collect-result.d.ts.map +1 -0
  16. package/dist/collect-result.js +142 -0
  17. package/dist/collect-result.js.map +1 -0
  18. package/dist/combinators.d.ts +14 -0
  19. package/dist/combinators.d.ts.map +1 -1
  20. package/dist/combinators.js +53 -16
  21. package/dist/combinators.js.map +1 -1
  22. package/dist/condition.d.ts +37 -0
  23. package/dist/condition.d.ts.map +1 -1
  24. package/dist/condition.js +48 -1
  25. package/dist/condition.js.map +1 -1
  26. package/dist/correspondence.d.ts +30 -0
  27. package/dist/correspondence.d.ts.map +1 -1
  28. package/dist/correspondence.js +36 -1
  29. package/dist/correspondence.js.map +1 -1
  30. package/dist/dedupe-config-findings.d.ts.map +1 -1
  31. package/dist/dedupe-config-findings.js +27 -0
  32. package/dist/dedupe-config-findings.js.map +1 -1
  33. package/dist/diff-aware.d.ts +8 -9
  34. package/dist/diff-aware.d.ts.map +1 -1
  35. package/dist/diff-aware.js +38 -17
  36. package/dist/diff-aware.js.map +1 -1
  37. package/dist/emitter-findings.d.ts +167 -0
  38. package/dist/emitter-findings.d.ts.map +1 -0
  39. package/dist/emitter-findings.js +237 -0
  40. package/dist/emitter-findings.js.map +1 -0
  41. package/dist/errors.d.ts +48 -0
  42. package/dist/errors.d.ts.map +1 -1
  43. package/dist/errors.js +61 -0
  44. package/dist/errors.js.map +1 -1
  45. package/dist/exclusion-comments.d.ts +36 -1
  46. package/dist/exclusion-comments.d.ts.map +1 -1
  47. package/dist/exclusion-comments.js +185 -37
  48. package/dist/exclusion-comments.js.map +1 -1
  49. package/dist/execute-rule.d.ts +12 -3
  50. package/dist/execute-rule.d.ts.map +1 -1
  51. package/dist/execute-rule.js +184 -7
  52. package/dist/execute-rule.js.map +1 -1
  53. package/dist/file-walk.d.ts +22 -0
  54. package/dist/file-walk.d.ts.map +1 -0
  55. package/dist/file-walk.js +51 -0
  56. package/dist/file-walk.js.map +1 -0
  57. package/dist/format-json.d.ts +13 -0
  58. package/dist/format-json.d.ts.map +1 -1
  59. package/dist/format-json.js +24 -0
  60. package/dist/format-json.js.map +1 -1
  61. package/dist/index.d.ts +14 -46
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +13 -41
  64. package/dist/index.js.map +1 -1
  65. package/dist/internal.d.ts +55 -0
  66. package/dist/internal.d.ts.map +1 -0
  67. package/dist/internal.js +92 -0
  68. package/dist/internal.js.map +1 -0
  69. package/dist/mask-non-comment.d.ts +49 -0
  70. package/dist/mask-non-comment.d.ts.map +1 -0
  71. package/dist/mask-non-comment.js +261 -0
  72. package/dist/mask-non-comment.js.map +1 -0
  73. package/dist/owns-empty-discovery.d.ts.map +1 -1
  74. package/dist/owns-empty-discovery.js +12 -4
  75. package/dist/owns-empty-discovery.js.map +1 -1
  76. package/dist/path-suffix.d.ts +57 -0
  77. package/dist/path-suffix.d.ts.map +1 -0
  78. package/dist/path-suffix.js +73 -0
  79. package/dist/path-suffix.js.map +1 -0
  80. package/dist/predicate.d.ts +12 -0
  81. package/dist/predicate.d.ts.map +1 -1
  82. package/dist/predicate.js +20 -1
  83. package/dist/predicate.js.map +1 -1
  84. package/dist/preset-dispatch.d.ts +6 -34
  85. package/dist/preset-dispatch.d.ts.map +1 -1
  86. package/dist/preset-dispatch.js +30 -52
  87. package/dist/preset-dispatch.js.map +1 -1
  88. package/dist/report.d.ts +31 -7
  89. package/dist/report.d.ts.map +1 -1
  90. package/dist/report.js +174 -15
  91. package/dist/report.js.map +1 -1
  92. package/dist/rule-builder-like.d.ts +8 -2
  93. package/dist/rule-builder-like.d.ts.map +1 -1
  94. package/dist/rule-builder.d.ts +15 -0
  95. package/dist/rule-builder.d.ts.map +1 -1
  96. package/dist/rule-builder.js +41 -36
  97. package/dist/rule-builder.js.map +1 -1
  98. package/dist/rule-description.d.ts +50 -0
  99. package/dist/rule-description.d.ts.map +1 -1
  100. package/dist/rule-description.js +58 -0
  101. package/dist/rule-description.js.map +1 -1
  102. package/dist/selection-memo.d.ts +1 -3
  103. package/dist/selection-memo.d.ts.map +1 -1
  104. package/dist/selection-memo.js +1 -3
  105. package/dist/selection-memo.js.map +1 -1
  106. package/dist/silent-exclusion.d.ts +12 -0
  107. package/dist/silent-exclusion.d.ts.map +1 -1
  108. package/dist/silent-exclusion.js +22 -0
  109. package/dist/silent-exclusion.js.map +1 -1
  110. package/dist/terminal-builder.d.ts +29 -15
  111. package/dist/terminal-builder.d.ts.map +1 -1
  112. package/dist/terminal-builder.js +97 -51
  113. package/dist/terminal-builder.js.map +1 -1
  114. package/dist/vacuity-findings.d.ts +0 -6
  115. package/dist/vacuity-findings.d.ts.map +1 -1
  116. package/dist/vacuity-findings.js +27 -57
  117. package/dist/vacuity-findings.js.map +1 -1
  118. package/dist/violation.d.ts +22 -1
  119. package/dist/violation.d.ts.map +1 -1
  120. package/dist/violation.js.map +1 -1
  121. package/dist/watch.d.ts +71 -0
  122. package/dist/watch.d.ts.map +1 -0
  123. package/dist/watch.js +129 -0
  124. package/dist/watch.js.map +1 -0
  125. package/package.json +6 -1
package/dist/errors.d.ts CHANGED
@@ -36,4 +36,52 @@ export declare class ArchRuleError extends Error {
36
36
  * them is matching on the contract rather than on a coincidence.
37
37
  */
38
38
  export declare function isArchRuleError(error: unknown): error is ArchRuleError;
39
+ /**
40
+ * Thrown when a RULE is misconfigured — bad arguments to a condition, a
41
+ * malformed rule file — as opposed to {@link ArchRuleError}, which means the
42
+ * architecture under test is wrong.
43
+ *
44
+ * The two are different faults with different audiences and the CLI already
45
+ * wants to tell them apart: `rule-file-findings.ts` branches on
46
+ * `isArchRuleError(error)` and routes everything else into one generic
47
+ * "rule file failed" path. An untyped `Error` therefore arrives with its
48
+ * category erased, and a rule author who mistyped an argument is shown the
49
+ * same surface as an unhandled crash.
50
+ *
51
+ * `subject` names what was misconfigured — the condition, predicate or file —
52
+ * so a caller can render the fault without parsing the message.
53
+ *
54
+ * **Why this class exists at all is worth recording.** eess ships an
55
+ * `agentGuardrails` preset whose `no-generic-errors` rule says a bare `Error`
56
+ * "loses the type/context callers need to handle it". This repo exempted itself
57
+ * from running that preset, on a written rationale that the rule fired on
58
+ * legitimate style. When the preset was finally run here it flagged 17 bare
59
+ * `Error`s, and the rationale did not survive contact: the caller the rule
60
+ * describes is real and lives in this package. Dogfooding produced this type.
61
+ */
62
+ export declare class ArchConfigError extends Error {
63
+ #private;
64
+ /**
65
+ * `options` forwards `cause`, and that is not decoration. `schema-loader.ts`
66
+ * distinguishes "the `graphql` package is missing" from "it is installed but
67
+ * failed to load", and the second case is only actionable because the
68
+ * underlying error travels with it — a fix whose own comment records that
69
+ * discarding it "used to be reported as 'not installed' too, discarding the
70
+ * one line that would have told the reader what actually happened". A typed
71
+ * error that dropped the cause would undo that.
72
+ */
73
+ constructor(subject: string, message: string, options?: ErrorOptions);
74
+ /** What was misconfigured — a condition name, a predicate name, a file path. */
75
+ get subject(): string;
76
+ }
77
+ /**
78
+ * Is this an `ArchConfigError` — including one thrown by a DIFFERENT copy of
79
+ * this module?
80
+ *
81
+ * Structural for the same reason {@link isArchRuleError} is: jiti and nested
82
+ * `node_modules` both put two copies of this class on disk, and `instanceof`
83
+ * is an identity check. Matches on `name` plus the `subject` accessor that is
84
+ * this class's whole reason to exist.
85
+ */
86
+ export declare function isArchConfigError(error: unknown): error is ArchConfigError;
39
87
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,KAAK;;gBAG1B,UAAU,EAAE,aAAa,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM;IAQxD,4DAA4D;IAC5D,IAAI,UAAU,IAAI,aAAa,EAAE,CAEhC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAQtE"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,KAAK;;gBAG1B,UAAU,EAAE,aAAa,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM;IAQxD,4DAA4D;IAC5D,IAAI,UAAU,IAAI,aAAa,EAAE,CAEhC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAQtE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,eAAgB,SAAQ,KAAK;;IAGxC;;;;;;;;OAQG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;IAMpE,gFAAgF;IAChF,IAAI,OAAO,IAAI,MAAM,CAEpB;CACF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAQ1E"}
package/dist/errors.js CHANGED
@@ -50,4 +50,65 @@ export function isArchRuleError(error) {
50
50
  'violations' in error &&
51
51
  Array.isArray(error.violations));
52
52
  }
53
+ /**
54
+ * Thrown when a RULE is misconfigured — bad arguments to a condition, a
55
+ * malformed rule file — as opposed to {@link ArchRuleError}, which means the
56
+ * architecture under test is wrong.
57
+ *
58
+ * The two are different faults with different audiences and the CLI already
59
+ * wants to tell them apart: `rule-file-findings.ts` branches on
60
+ * `isArchRuleError(error)` and routes everything else into one generic
61
+ * "rule file failed" path. An untyped `Error` therefore arrives with its
62
+ * category erased, and a rule author who mistyped an argument is shown the
63
+ * same surface as an unhandled crash.
64
+ *
65
+ * `subject` names what was misconfigured — the condition, predicate or file —
66
+ * so a caller can render the fault without parsing the message.
67
+ *
68
+ * **Why this class exists at all is worth recording.** eess ships an
69
+ * `agentGuardrails` preset whose `no-generic-errors` rule says a bare `Error`
70
+ * "loses the type/context callers need to handle it". This repo exempted itself
71
+ * from running that preset, on a written rationale that the rule fired on
72
+ * legitimate style. When the preset was finally run here it flagged 17 bare
73
+ * `Error`s, and the rationale did not survive contact: the caller the rule
74
+ * describes is real and lives in this package. Dogfooding produced this type.
75
+ */
76
+ export class ArchConfigError extends Error {
77
+ #subject;
78
+ /**
79
+ * `options` forwards `cause`, and that is not decoration. `schema-loader.ts`
80
+ * distinguishes "the `graphql` package is missing" from "it is installed but
81
+ * failed to load", and the second case is only actionable because the
82
+ * underlying error travels with it — a fix whose own comment records that
83
+ * discarding it "used to be reported as 'not installed' too, discarding the
84
+ * one line that would have told the reader what actually happened". A typed
85
+ * error that dropped the cause would undo that.
86
+ */
87
+ constructor(subject, message, options) {
88
+ super(message, options);
89
+ this.name = 'ArchConfigError';
90
+ this.#subject = subject;
91
+ }
92
+ /** What was misconfigured — a condition name, a predicate name, a file path. */
93
+ get subject() {
94
+ return this.#subject;
95
+ }
96
+ }
97
+ /**
98
+ * Is this an `ArchConfigError` — including one thrown by a DIFFERENT copy of
99
+ * this module?
100
+ *
101
+ * Structural for the same reason {@link isArchRuleError} is: jiti and nested
102
+ * `node_modules` both put two copies of this class on disk, and `instanceof`
103
+ * is an identity check. Matches on `name` plus the `subject` accessor that is
104
+ * this class's whole reason to exist.
105
+ */
106
+ export function isArchConfigError(error) {
107
+ if (error instanceof ArchConfigError)
108
+ return true;
109
+ return (error instanceof Error &&
110
+ error.name === 'ArchConfigError' &&
111
+ 'subject' in error &&
112
+ typeof error.subject === 'string');
113
+ }
53
114
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK;IAC7B,WAAW,CAAiB;IAErC,YAAY,UAA2B,EAAE,MAAe;QACtD,MAAM,OAAO,GAAG,yBAAyB,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAA;QAClH,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QAC/C,KAAK,CAAC,GAAG,OAAO,GAAG,UAAU,EAAE,CAAC,CAAA;QAChC,IAAI,CAAC,IAAI,GAAG,eAAe,CAAA;QAC3B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAA;IAC/B,CAAC;IAED,4DAA4D;IAC5D,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAA;IACzB,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,IAAI,KAAK,YAAY,aAAa;QAAE,OAAO,IAAI,CAAA;IAC/C,OAAO,CACL,KAAK,YAAY,KAAK;QACtB,KAAK,CAAC,IAAI,KAAK,eAAe;QAC9B,YAAY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AClE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAA;QAC7B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;IACzB,CAAC;IAED,gFAAgF;IAChF,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,IAAI,KAAK,YAAY,eAAe;QAAE,OAAO,IAAI,CAAA;IACjD,OAAO,CACL,KAAK,YAAY,KAAK;QACtB,KAAK,CAAC,IAAI,KAAK,iBAAiB;QAChC,SAAS,IAAI,KAAK;QAClB,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAClC,CAAA;AACH,CAAC"}
@@ -26,6 +26,22 @@ export interface ExclusionWarning {
26
26
  file: string;
27
27
  /** Line number */
28
28
  line: number;
29
+ /**
30
+ * What kind of fault this is, so a caller can act on it differently.
31
+ *
32
+ * `'undocumented'` — the directive is well-formed but states no reason. It is
33
+ * refused (see the reason-free branches below), and a caller may additionally
34
+ * promote this to a finding so the author is told what to fix rather than
35
+ * shown the unrelated violation their waiver was covering. `eess-ts` does.
36
+ *
37
+ * `'malformed'` — the directive is broken syntax. Also refused, and the
38
+ * original violation is already firing, so a stderr line is the right weight.
39
+ *
40
+ * Added when the two parsers were unified (ADR-012): only `eess-ts`'s copy had
41
+ * it, and its `execute-rule` branches on it. Merging without it would have
42
+ * silently downgraded bug 0039's gate to a stderr line.
43
+ */
44
+ kind: 'undocumented' | 'malformed';
29
45
  }
30
46
  /**
31
47
  * Result of parsing exclusion comments from a source file.
@@ -47,6 +63,25 @@ export interface ParseResult {
47
63
  * <!-- eess-exclude <rule-id>: <reason> --> (markdown / text dialects)
48
64
  * <!-- eess-exclude-start <rule-id>: <reason> --> / <!-- eess-exclude-end -->
49
65
  */
50
- export declare function parseExclusionComments(sourceText: string, filePath: string): ParseResult;
66
+ /**
67
+ * Blanks the spans of a file that are NOT comments, length- and line-preserving
68
+ * so every reported position still points at the original.
69
+ *
70
+ * A dialect that knows its language supplies one; `eess-ts` passes a
71
+ * ts-morph-backed masker. See ADR-012.
72
+ */
73
+ export type MaskNonComment = (sourceText: string, filePath: string) => string;
74
+ export interface ParseExclusionOptions {
75
+ /**
76
+ * A dialect's own masker, applied BEFORE the kernel's default.
77
+ *
78
+ * Composition, not replacement (ADR-012 clause 3). An injected masker can only
79
+ * blank MORE than the default, never less, so the worst a bad one can do is
80
+ * hide a directive (loud) rather than expose one written inside a string
81
+ * literal (silent, and bug 0154).
82
+ */
83
+ mask?: MaskNonComment;
84
+ }
85
+ export declare function parseExclusionComments(sourceText: string, filePath: string, options?: ParseExclusionOptions): ParseResult;
51
86
  export declare function isExcludedByComment(violation: ArchViolation, comments: ExclusionComment[]): boolean;
52
87
  //# sourceMappingURL=exclusion-comments.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exclusion-comments.d.ts","sourceRoot":"","sources":["../src/exclusion-comments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAA;IACd,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAA;IACZ,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,oDAAoD;IACpD,OAAO,EAAE,OAAO,CAAA;IAChB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;GAEG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;GAUG;AACH;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;AAE7E,MAAM,WAAW,qBAAqB;IACpC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,cAAc,CAAA;CACtB;AAED,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,WAAW,CAsFb;AAuBD,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,gBAAgB,EAAE,GAC3B,OAAO,CAUT"}
@@ -1,10 +1,55 @@
1
+ import { maskNonCommentSpans, maskMarkdownCodeSpans } from './mask-non-comment.js';
1
2
  // Single-line: // eess-exclude <rule-id>[, <rule-id>]: <reason>
2
3
  // Single-line without reason: // eess-exclude <rule-id>
3
- const SINGLE_LINE_RE = /\/\/\s*eess-exclude\s+(.+)/;
4
+ // The directive must OPEN its comment (bug 0154). Masking alone took this file's
5
+ // own false-positive count from 12 to 7; the rest were genuine line comments that
6
+ // merely DESCRIBE the grammar — like the line above this one. No lexical rule can
7
+ // separate those, but anchoring to the start of the comment body separates all of
8
+ // them from every real directive, including the trailing `code // eess-exclude …`
9
+ // form.
10
+ //
11
+ // Rejected alternative: validating the rule-id's shape. It rejects `<rule-id>`
12
+ // and still accepts `// see eess-exclude a/b: why`, and it couples this parser to
13
+ // an id grammar nothing else enforces.
14
+ const SINGLE_LINE_RE = /^[ \t]*eess-exclude[ \t]+(.+)/;
15
+ /**
16
+ * The body of a line's FIRST `//` comment, or undefined if it has none.
17
+ *
18
+ * The directive must open the comment, and it must be the comment the line
19
+ * actually starts — not any `//` on the line. A grammar description carries two:
20
+ *
21
+ * // Single-line: // eess-exclude <rule-id>: <reason>
22
+ *
23
+ * Anchoring to `//` alone matches the second one and reads the file's own
24
+ * documentation as 8 live waivers. Taking the first `//` and requiring the
25
+ * directive at the start of its body separates every description from every real
26
+ * directive, including the trailing `code // eess-exclude …` form, whose first
27
+ * `//` is the directive's own.
28
+ */
29
+ const CODE_LIKE = /\.(?:[cm]?[jt]sx?|vue|svelte)$/i;
30
+ const MARKDOWN_LIKE = /\.(?:md|markdown|mdx)$/i;
31
+ /**
32
+ * The HTML-comment forms exist for text dialects whose sources have no `//` —
33
+ * markdown corpora and the like. In a `.ts` file `// <!-- eess-exclude … -->` is
34
+ * prose describing the grammar, and reading it accounted for the last 2 of this
35
+ * very file's own false hits (bug 0154).
36
+ */
37
+ function htmlFormsApply(filePath) {
38
+ return !CODE_LIKE.test(filePath);
39
+ }
40
+ function firstCommentBody(line) {
41
+ const at = line.indexOf('//');
42
+ return at === -1 ? undefined : line.slice(at + 2);
43
+ }
4
44
  // Block start: // eess-exclude-start <rule-id>[, <rule-id>]: <reason>
5
- const BLOCK_START_RE = /\/\/\s*eess-exclude-start\s+(.+)/;
45
+ // The trailing group is OPTIONAL. A bare `// eess-exclude-start` (no ids, no
46
+ // reason) used to match nothing at all — so it pushed no frame, said nothing,
47
+ // and the next `-end` closed the ENCLOSING block. Same two symptoms as the
48
+ // reason-free case, through a shape the reason-free fix did not reach: it is a
49
+ // bracket the reader can see, so it must consume the `-end` written for it.
50
+ const BLOCK_START_RE = /^[ \t]*eess-exclude-start(?:[ \t]+(.*))?[ \t]*$/;
6
51
  // Block end: // eess-exclude-end
7
- const BLOCK_END_RE = /\/\/\s*eess-exclude-end\b/;
52
+ const BLOCK_END_RE = /^[ \t]*eess-exclude-end\b/;
8
53
  // HTML-comment forms — the same directives for text dialects whose sources
9
54
  // aren't `//`-commented (markdown corpora, and any future text dialect).
10
55
  // <!-- eess-exclude <rule-id>[, <rule-id>]: <reason> -->
@@ -37,19 +82,24 @@ function parseRuleIdsAndReason(content) {
37
82
  }
38
83
  /** Handle a block-end directive line. */
39
84
  function handleBlockEnd(openBlocks, exclusions, warnings, filePath, lineNum) {
40
- if (openBlocks.size === 0) {
85
+ // Bug 0158: pop the INNERMOST frame. Closing every open block meant an inner
86
+ // `-end` silently ended the outer one, so the outer waiver stopped applying
87
+ // partway through the region it was written for — two wrong results from one
88
+ // input, and neither reported.
89
+ const frame = openBlocks.pop();
90
+ if (frame === undefined) {
41
91
  warnings.push({
42
92
  message: `eess-exclude-end without matching start`,
43
93
  file: filePath,
44
94
  line: lineNum,
95
+ kind: 'malformed',
45
96
  });
46
97
  return;
47
98
  }
48
- for (const [, comment] of openBlocks) {
99
+ for (const comment of frame) {
49
100
  comment.endLine = lineNum;
50
101
  exclusions.push(comment);
51
102
  }
52
- openBlocks.clear();
53
103
  }
54
104
  /** Emit undocumented-exclusion warnings for each rule ID when no reason is given. */
55
105
  function warnUndocumented(warnings, ruleIds, directive, filePath, lineNum) {
@@ -60,32 +110,85 @@ function warnUndocumented(warnings, ruleIds, directive, filePath, lineNum) {
60
110
  ` Fix: Add a reason — // ${directive} ${ruleId}: <why>`,
61
111
  file: filePath,
62
112
  line: lineNum,
113
+ kind: 'undocumented',
63
114
  });
64
115
  }
65
116
  }
66
117
  /** Handle a block-start directive line. */
67
118
  function handleBlockStart(content, openBlocks, warnings, filePath, lineNum) {
68
- if (openBlocks.size > 0) {
119
+ const { ruleIds, reason } = parseRuleIdsAndReason(content);
120
+ if (ruleIds.length === 0) {
121
+ // A `-start` naming no rule at all. It still consumes its `-end` (see the
122
+ // regex comment), but it is malformed and saying nothing about it would be
123
+ // the silence this whole grammar is written to refuse.
69
124
  warnings.push({
70
- message: `Nested eess-exclude-start — close existing block first`,
125
+ message: `eess-exclude-start names no rule id. ` +
126
+ `Fix: write // eess-exclude-start <rule-id>: <why>, or delete the directive ` +
127
+ `and its matching -end.`,
71
128
  file: filePath,
72
129
  line: lineNum,
130
+ kind: 'malformed',
73
131
  });
132
+ openBlocks.push(ruleIds.map((ruleId) => ({
133
+ ruleId,
134
+ reason,
135
+ file: filePath,
136
+ line: lineNum,
137
+ isBlock: true,
138
+ })));
74
139
  return;
75
140
  }
76
- const { ruleIds, reason } = parseRuleIdsAndReason(content);
77
141
  if (reason === '') {
78
142
  warnUndocumented(warnings, ruleIds, 'eess-exclude-start', filePath, lineNum);
79
- }
80
- for (const ruleId of ruleIds) {
81
- openBlocks.set(ruleId, {
143
+ // Push an EMPTY frame rather than returning. Refusing the waiver and
144
+ // refusing the frame are different things: `-start`/`-end` is a bracket
145
+ // language, so a `-start` the reader can see must consume the `-end` the
146
+ // reader wrote for it, whatever we decide about its reason.
147
+ //
148
+ // Returning here — as this did when bug 0158's two halves shipped together —
149
+ // let the next `-end` pop the OUTER frame, so a valid enclosing waiver
150
+ // stopped early and a balanced file reported "end without matching start".
151
+ // That is precisely the frame-mangling 0158's nesting half removed,
152
+ // reintroduced by its reason-required half. Empty means it suppresses
153
+ // nothing, which is the refusal; present means the brackets still pair.
154
+ openBlocks.push(ruleIds.map((ruleId) => ({
82
155
  ruleId,
83
156
  reason,
84
157
  file: filePath,
85
158
  line: lineNum,
86
159
  isBlock: true,
160
+ })));
161
+ return;
162
+ }
163
+ // A rule re-opened while already open is warned but still applied. The likeliest
164
+ // cause is a missing `-end`, which the author wants to know; refusing it is what
165
+ // produced the early-close bug. Ported from `eess-ts` when the parsers were
166
+ // unified (ADR-012) — the kernel had no such warning, so `eess-md`,
167
+ // `eess-mermaid` and `eess-gherkin` never got it.
168
+ const alreadyOpen = new Set(openBlocks.flat().map((c) => c.ruleId));
169
+ for (const ruleId of ruleIds) {
170
+ if (!alreadyOpen.has(ruleId))
171
+ continue;
172
+ warnings.push({
173
+ message: `eess-exclude-start for '${ruleId}' is already open — ` +
174
+ `the enclosing block covers this region. Fix: remove this directive, ` +
175
+ `or close the enclosing block first if the nesting was unintended.`,
176
+ file: filePath,
177
+ line: lineNum,
178
+ kind: 'malformed',
87
179
  });
88
180
  }
181
+ // Bug 0158: nesting is supported rather than refused. Blocks are a STACK, not
182
+ // a map keyed by rule id — the map dropped an inner `-start` outright, and a
183
+ // second start for the same id overwrote the first. One `-start` pushes one
184
+ // frame, whatever number of ids it names.
185
+ openBlocks.push(ruleIds.map((ruleId) => ({
186
+ ruleId,
187
+ reason,
188
+ file: filePath,
189
+ line: lineNum,
190
+ isBlock: true,
191
+ })));
89
192
  }
90
193
  /** Handle a single-line exclude directive. */
91
194
  function handleSingleLine(content, exclusions, warnings, filePath, lineNum) {
@@ -93,6 +196,21 @@ function handleSingleLine(content, exclusions, warnings, filePath, lineNum) {
93
196
  if (content.startsWith('-start') || content.startsWith('-end'))
94
197
  return;
95
198
  const { ruleIds, reason } = parseRuleIdsAndReason(content);
199
+ // Bug 0158: the grammar documents `<rule-id>: <reason>`, and a reason-free
200
+ // directive must not silence a real finding while the build exits 0.
201
+ //
202
+ // **How that is enforced changed in ADR-012, and the change is the point.**
203
+ // This used to `return` — refusing the waiver — so the author saw the original
204
+ // violation and a line on stderr about their directive. `eess-ts` had always
205
+ // done the opposite (bug 0039): apply the waiver, and let `execute-rule`
206
+ // replace the suppressed finding with an UNSUPPRESSABLE one saying the waiver
207
+ // states no reason. Both end red; the second tells the author what to fix
208
+ // instead of showing them the thing they were waiving.
209
+ //
210
+ // Unifying the two parsers forced a choice, and `eess-ts`'s is the better
211
+ // design, so the kernel adopts it — which means the other four dialects gain
212
+ // it. It is safe here because the kernel's own `execute-rule` now does the
213
+ // promotion; applying without promoting would be the fail-open.
96
214
  if (reason === '') {
97
215
  warnUndocumented(warnings, ruleIds, 'eess-exclude', filePath, lineNum);
98
216
  }
@@ -106,51 +224,81 @@ function handleSingleLine(content, exclusions, warnings, filePath, lineNum) {
106
224
  });
107
225
  }
108
226
  }
109
- /**
110
- * Scan a source file for eess-exclude comments.
111
- *
112
- * Supported formats:
113
- * // eess-exclude <rule-id>: <reason>
114
- * // eess-exclude-start <rule-id>: <reason>
115
- * // eess-exclude-end
116
- * // eess-exclude <rule-a>, <rule-b>: <reason>
117
- * <!-- eess-exclude <rule-id>: <reason> --> (markdown / text dialects)
118
- * <!-- eess-exclude-start <rule-id>: <reason> --> / <!-- eess-exclude-end -->
119
- */
120
- export function parseExclusionComments(sourceText, filePath) {
121
- const lines = sourceText.split('\n');
227
+ export function parseExclusionComments(sourceText, filePath, options) {
228
+ // Bug 0154: read directives from MASKED text, never the raw source. Strings,
229
+ // templates, regex literals and block comments are blanked first — a directive
230
+ // written inside one is prose, and reading it silently waived a real finding on
231
+ // the next line. Masking is length- and line-preserving, so every position
232
+ // reported below is still the position in the original file.
233
+ // Mask with the lexer that matches the file. Running the JS/TS one over
234
+ // markdown made a stray backtick swallow every directive after it — the same
235
+ // question (is this text an example or an instance?) needs the host language's
236
+ // answer, not one language's answer everywhere.
237
+ //
238
+ // Routed on MARKDOWN specifically, not on "not code". The first version used
239
+ // `!CODE_LIKE`, which handed `.mmd`, `.feature`, `.yml` and everything else to
240
+ // the markdown lexer — and a `.mmd` node label is a quoted string, which the
241
+ // JS masker blanks and the markdown one does not. That is the very mistake this
242
+ // comment describes, committed by the fix for it. Anything neither code nor
243
+ // markdown keeps the conservative masker: over-masking hides a directive
244
+ // (loud), under-masking invents one (silent).
245
+ const defaultMask = CODE_LIKE.test(filePath)
246
+ ? maskNonCommentSpans
247
+ : MARKDOWN_LIKE.test(filePath)
248
+ ? maskMarkdownCodeSpans
249
+ : maskNonCommentSpans;
250
+ // The dialect's masker runs FIRST and the default runs over its output, so the
251
+ // default's protection cannot be opted out of (ADR-012). A dialect supplies
252
+ // accuracy; it cannot supply permission.
253
+ const injected = options?.mask;
254
+ const masked = injected ? defaultMask(injected(sourceText, filePath)) : defaultMask(sourceText);
255
+ const lines = masked.split('\n');
256
+ const htmlApply = htmlFormsApply(filePath);
122
257
  const exclusions = [];
123
258
  const warnings = [];
124
- const openBlocks = new Map();
259
+ const openBlocks = [];
125
260
  for (let i = 0; i < lines.length; i++) {
126
261
  const line = lines[i];
127
262
  if (line === undefined)
128
263
  continue;
129
264
  const lineNum = i + 1;
130
265
  // Check block end first (before start/single so we don't match -start as single)
131
- if (BLOCK_END_RE.test(line) || HTML_BLOCK_END_RE.test(line)) {
266
+ // The `//` forms read the FIRST comment's body; the HTML forms read the
267
+ // whole line, since they are for text dialects with no `//` at all.
268
+ const body = firstCommentBody(line);
269
+ if ((body !== undefined && BLOCK_END_RE.test(body)) ||
270
+ (htmlApply && HTML_BLOCK_END_RE.test(line))) {
132
271
  handleBlockEnd(openBlocks, exclusions, warnings, filePath, lineNum);
133
272
  continue;
134
273
  }
135
274
  // Check block start
136
- const startMatch = BLOCK_START_RE.exec(line) ?? HTML_BLOCK_START_RE.exec(line);
137
- if (startMatch?.[1]) {
138
- handleBlockStart(startMatch[1], openBlocks, warnings, filePath, lineNum);
275
+ const startMatch = (body === undefined ? null : BLOCK_START_RE.exec(body)) ??
276
+ (htmlApply ? HTML_BLOCK_START_RE.exec(line) : null);
277
+ // `startMatch !== null`, not `startMatch?.[1]`. The capture is optional now, so
278
+ // a bare `// eess-exclude-start` matches with group 1 undefined — and testing
279
+ // the GROUP threw that line away again, which is the same "no frame, silent,
280
+ // enclosing block closes early" defect one level up from the regex.
281
+ if (startMatch !== null) {
282
+ handleBlockStart(startMatch[1] ?? '', openBlocks, warnings, filePath, lineNum);
139
283
  continue;
140
284
  }
141
285
  // Check single-line exclude (must not match block directives)
142
- const singleMatch = SINGLE_LINE_RE.exec(line) ?? HTML_SINGLE_RE.exec(line);
286
+ const singleMatch = (body === undefined ? null : SINGLE_LINE_RE.exec(body)) ??
287
+ (htmlApply ? HTML_SINGLE_RE.exec(line) : null);
143
288
  if (singleMatch?.[1]) {
144
289
  handleSingleLine(singleMatch[1], exclusions, warnings, filePath, lineNum);
145
290
  }
146
291
  }
147
292
  // Any unclosed blocks are errors
148
- for (const [, comment] of openBlocks) {
149
- warnings.push({
150
- message: `eess-exclude-start without matching end for rule '${comment.ruleId}'`,
151
- file: filePath,
152
- line: comment.line,
153
- });
293
+ for (const frame of openBlocks) {
294
+ for (const comment of frame) {
295
+ warnings.push({
296
+ message: `eess-exclude-start without matching end for rule '${comment.ruleId}'`,
297
+ file: filePath,
298
+ line: comment.line,
299
+ kind: 'malformed',
300
+ });
301
+ }
154
302
  }
155
303
  return { exclusions, warnings };
156
304
  }
@@ -1 +1 @@
1
- {"version":3,"file":"exclusion-comments.js","sourceRoot":"","sources":["../src/exclusion-comments.ts"],"names":[],"mappings":"AA0CA,gEAAgE;AAChE,wDAAwD;AACxD,MAAM,cAAc,GAAG,4BAA4B,CAAA;AAEnD,sEAAsE;AACtE,MAAM,cAAc,GAAG,kCAAkC,CAAA;AAEzD,iCAAiC;AACjC,MAAM,YAAY,GAAG,2BAA2B,CAAA;AAEhD,2EAA2E;AAC3E,yEAAyE;AACzE,yDAAyD;AACzD,MAAM,cAAc,GAAG,mCAAmC,CAAA;AAC1D,MAAM,mBAAmB,GAAG,yCAAyC,CAAA;AACrE,MAAM,iBAAiB,GAAG,+BAA+B,CAAA;AAEzD;;;;;GAKG;AACH,SAAS,qBAAqB,CAAC,OAAe;IAC5C,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IACvC,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;QACnB,gDAAgD;QAChD,MAAM,OAAO,GAAG,OAAO;aACpB,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;aACpB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAAA;IAChC,CAAC;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAA;IAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;IACnD,MAAM,OAAO,GAAG,OAAO;SACpB,KAAK,CAAC,GAAG,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  import type { CheckOptions } from './check-options.js';
3
4
  import type { RuleMetadata } from './rule-metadata.js';
4
5
  /**
@@ -6,8 +7,17 @@ import type { RuleMetadata } from './rule-metadata.js';
6
7
  * Shared across all builder types (RuleBuilder, SliceRuleBuilder,
7
8
  * SchemaRuleBuilder, ResolverRuleBuilder, PairFinalBuilder, SmellBuilder).
8
9
  */
9
- interface ExecuteRuleContext {
10
+ export interface ExecuteRuleContext {
10
11
  reason?: string;
12
+ /**
13
+ * This rule's own sentence, deferred (bug 0258).
14
+ *
15
+ * A thunk rather than a string because `filterContext()` runs on every
16
+ * terminal call and this is only read when an id-less rule turns out to have
17
+ * an exclusion comment it cannot honour — the same shape `facts()` already
18
+ * uses for `describeRule` a few lines above it.
19
+ */
20
+ describe?: () => string;
11
21
  metadata?: RuleMetadata;
12
22
  exclusions?: (string | RegExp)[];
13
23
  silentIndices?: Set<number>;
@@ -28,10 +38,9 @@ export declare function applyFilters(violations: ArchViolation[], ctx: ExecuteRu
28
38
  /**
29
39
  * Execute the terminal "check" action: apply options, format, throw on violations.
30
40
  */
31
- export declare function executeCheck(violations: ArchViolation[], ctx: ExecuteRuleContext, options?: CheckOptions): void;
41
+ export declare function executeCheck(violations: CollectResult, ctx: ExecuteRuleContext, options?: CheckOptions): void;
32
42
  /**
33
43
  * Execute the terminal "warn" action: apply options, format, log to stderr.
34
44
  */
35
45
  export declare function executeWarn(violations: ArchViolation[], ctx: ExecuteRuleContext, options?: CheckOptions): void;
36
- export {};
37
46
  //# sourceMappingURL=execute-rule.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"execute-rule.d.ts","sourceRoot":"","sources":["../src/execute-rule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAWtD;;;;GAIG;AACH,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