@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
package/dist/execute-rule.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
|
+
import { collectResult } from './collect-result.js';
|
|
2
3
|
import { severityFor } from './violation.js';
|
|
3
4
|
import { ArchRuleError } from './errors.js';
|
|
4
5
|
import { formatViolations } from './format.js';
|
|
@@ -6,6 +7,7 @@ import { formatViolationsJson } from './format-json.js';
|
|
|
6
7
|
import { formatViolationsGitHub } from './format-github.js';
|
|
7
8
|
import { reportViolations } from './report.js';
|
|
8
9
|
import { parseExclusionComments, isExcludedByComment } from './exclusion-comments.js';
|
|
10
|
+
import { UNSUPPRESSABLE } from './unsuppressable.js';
|
|
9
11
|
import { writeStderr } from './stderr.js';
|
|
10
12
|
import { activeNotice } from './diff-disclosure.js';
|
|
11
13
|
import { recordCommentSuppression } from './comment-suppression.js';
|
|
@@ -94,15 +96,41 @@ export function applyFilters(violations, ctx) {
|
|
|
94
96
|
v.docs = ctx.metadata.docs;
|
|
95
97
|
}
|
|
96
98
|
}
|
|
97
|
-
// Scan source files for inline exclusion comments
|
|
98
|
-
//
|
|
99
|
-
|
|
99
|
+
// Scan source files for inline exclusion comments.
|
|
100
|
+
//
|
|
101
|
+
// **Not gated on `ctx.metadata?.id` any more (bug 0255).** It used to be, and
|
|
102
|
+
// that made the worst case of an inert directive the quietest: with no
|
|
103
|
+
// `.rule({ id })` a comment can never match — `isExcludedByComment` returns
|
|
104
|
+
// false without a `ruleId` — and because the block was skipped, the file was
|
|
105
|
+
// never even parsed, so nothing could notice. An adopter following the
|
|
106
|
+
// documented sanction recipe got the same red build and no explanation.
|
|
107
|
+
//
|
|
108
|
+
// The cost is bounded the same way it always was: only files that already
|
|
109
|
+
// produced a violation are read. A rule with no id now pays one parse per
|
|
110
|
+
// violating file to be able to say why the sanction did nothing.
|
|
111
|
+
if (result.length > 0) {
|
|
100
112
|
const filePaths = new Set(result.map((v) => v.file));
|
|
113
|
+
const undocumented = [];
|
|
101
114
|
const allComments = [...filePaths].flatMap((filePath) => {
|
|
102
115
|
try {
|
|
103
116
|
const sourceText = fs.readFileSync(filePath, 'utf-8');
|
|
104
117
|
const parseResult = parseExclusionComments(sourceText, filePath);
|
|
105
118
|
for (const warning of parseResult.warnings) {
|
|
119
|
+
// An undocumented exclusion is well-formed and APPLIES, so a stderr
|
|
120
|
+
// line would let a waiver nobody justified pass with exit 0. It
|
|
121
|
+
// becomes an unsuppressable finding below instead — ADR-009 rule 3's
|
|
122
|
+
// corollary, and bug 0039's design, which until ADR-012 only `eess-ts`
|
|
123
|
+
// implemented. The malformed shapes decline to create the exclusion at
|
|
124
|
+
// all, so the original violation still fires and the build is already
|
|
125
|
+
// red; stderr is the right weight for those.
|
|
126
|
+
if (warning.kind === 'undocumented' && ctx.metadata?.id !== undefined) {
|
|
127
|
+
// The promotion below builds an unsuppressable finding keyed on the
|
|
128
|
+
// rule id. Without one there is nothing to key it on — and the
|
|
129
|
+
// directive is inert anyway, which the inert report says with a
|
|
130
|
+
// remedy the author can act on. So it falls through to stderr.
|
|
131
|
+
undocumented.push(warning);
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
106
134
|
writeStderr(`[eess] ${warning.message}`);
|
|
107
135
|
}
|
|
108
136
|
return parseResult.exclusions;
|
|
@@ -115,16 +143,152 @@ export function applyFilters(violations, ctx) {
|
|
|
115
143
|
return [];
|
|
116
144
|
}
|
|
117
145
|
});
|
|
118
|
-
|
|
119
|
-
|
|
146
|
+
const ruleId = ctx.metadata?.id;
|
|
147
|
+
if (allComments.length > 0 && ruleId !== undefined) {
|
|
148
|
+
// Which comments actually did something, so the ones that did nothing can
|
|
149
|
+
// be named. Reuses `isExcludedByComment` one comment at a time rather than
|
|
150
|
+
// re-deriving the match, so this can never drift from the real rule.
|
|
151
|
+
const spent = new Set();
|
|
120
152
|
result = result.filter((v) => {
|
|
121
153
|
if (v.bypassFilters === true)
|
|
122
154
|
return true;
|
|
123
155
|
const excluded = isExcludedByComment(v, allComments);
|
|
124
|
-
if (excluded)
|
|
156
|
+
if (excluded) {
|
|
125
157
|
recordCommentSuppression(ruleId, v.file);
|
|
158
|
+
for (const c of allComments)
|
|
159
|
+
if (isExcludedByComment(v, [c]))
|
|
160
|
+
spent.add(c);
|
|
161
|
+
}
|
|
126
162
|
return !excluded;
|
|
127
163
|
});
|
|
164
|
+
// A directive naming THIS rule that suppressed nothing. Same shape and the
|
|
165
|
+
// same weight as the `.excluding()` "Unused exclusion" line above — that
|
|
166
|
+
// mechanism has warned about a stale pattern since bug 0044; the comment
|
|
167
|
+
// form never did, which is bug 0255.
|
|
168
|
+
//
|
|
169
|
+
// **The wording is domain-neutral on purpose.** The first version explained
|
|
170
|
+
// the next-line scope in terms of markdown table rows, because that is the
|
|
171
|
+
// corpus bug 0255 was filed against. This function is the kernel's, and
|
|
172
|
+
// `eess-mermaid` and `eess-gherkin` run it unforked — so a stale directive
|
|
173
|
+
// in a `.mmd` or `.feature` file was told it sat "inside a markdown table".
|
|
174
|
+
// Review caught it, and caught the tell: the hand-port into `eess-ts`
|
|
175
|
+
// silently dropped the table clause because it made no sense there, which
|
|
176
|
+
// is the evidence it never belonged at the shared layer. The table nuance
|
|
177
|
+
// now lives in `docs/markdown.md`, where the dialect that has tables is
|
|
178
|
+
// documented.
|
|
179
|
+
//
|
|
180
|
+
// Scoped to this rule's id on purpose: a file may carry directives for many
|
|
181
|
+
// rules, and one naming another rule matched nothing here for a good
|
|
182
|
+
// reason. Without that scope this would fire once per unrelated directive
|
|
183
|
+
// per rule.
|
|
184
|
+
for (const c of allComments) {
|
|
185
|
+
if (c.ruleId !== ruleId || spent.has(c))
|
|
186
|
+
continue;
|
|
187
|
+
writeStderr(`[eess] Exclusion comment for '${ruleId}' at ${c.file}:${String(c.line)} ` +
|
|
188
|
+
`suppressed nothing. It may be stale, or out of reach: a single-line ` +
|
|
189
|
+
`directive covers only the NEXT line. eess-exclude-start/-end covers a ` +
|
|
190
|
+
`region instead.`);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
else if (allComments.length > 0) {
|
|
194
|
+
// No rule id, so no comment here can ever match: `isExcludedByComment`
|
|
195
|
+
// refuses without one.
|
|
196
|
+
//
|
|
197
|
+
// **This branch cannot say whose directive it is looking at, and the first
|
|
198
|
+
// version pretended otherwise.** It named each comment's own rule id and
|
|
199
|
+
// told the reader to add `.rule({ id: <that id> })` — but from inside one
|
|
200
|
+
// rule's execution there is no way to know whether that id already belongs
|
|
201
|
+
// to a different, working rule. Review reproduced the harm: a directive
|
|
202
|
+
// correctly waiving `other/rule` in a file where an id-less rule also
|
|
203
|
+
// fired produced advice to claim `other/rule` for the id-less one, which
|
|
204
|
+
// nothing prevents and which would collide two rules on one id.
|
|
205
|
+
//
|
|
206
|
+
// So it states the fact and leaves the id to the author. One line per
|
|
207
|
+
// file, not per comment, for the same reason its sibling scopes by id: a
|
|
208
|
+
// file may carry directives for many rules and none of them is evidence
|
|
209
|
+
// about this one.
|
|
210
|
+
const byFile = new Map();
|
|
211
|
+
for (const c of allComments) {
|
|
212
|
+
const lines = byFile.get(c.file);
|
|
213
|
+
if (lines)
|
|
214
|
+
lines.push(c.line);
|
|
215
|
+
else
|
|
216
|
+
byFile.set(c.file, [c.line]);
|
|
217
|
+
}
|
|
218
|
+
// Name the rule by its `.because()` reason when it has one (bug 0258).
|
|
219
|
+
// An id-less rule has no id to name, so several id-less chains over one
|
|
220
|
+
// file printed byte-identical lines and a reader could not tell which
|
|
221
|
+
// chain needed the id. The reason is a discriminator that already exists:
|
|
222
|
+
// `.because()` works without `.rule({ id })`, and `ctx.reason` is stamped
|
|
223
|
+
// onto violations a few lines above this. Whitespace is collapsed because
|
|
224
|
+
// the reason is prose and may wrap, and this report is deliberately one
|
|
225
|
+
// line per file. A rule with neither id nor reason is genuinely anonymous
|
|
226
|
+
// and the message stays exactly as it was.
|
|
227
|
+
// Name the rule, preferring its own sentence over its reason.
|
|
228
|
+
//
|
|
229
|
+
// The first version of this used `.because()` alone, on the premise that
|
|
230
|
+
// no rule description was reachable here. Review measured that false:
|
|
231
|
+
// every builder implements `describeRule()`, `filterContext()` is a method
|
|
232
|
+
// on the class that has it, and the kernel already names an id-less rule
|
|
233
|
+
// this way for its assertion-less finding a couple of hundred lines above.
|
|
234
|
+
// `.because()` is optional prose — the chains this diagnostic targets
|
|
235
|
+
// often have neither an id nor a reason — so leaning on it alone was a
|
|
236
|
+
// weaker floor for the same cost.
|
|
237
|
+
//
|
|
238
|
+
// `'unnamed'` is `TerminalBuilder`'s own fallback for a rule with no id;
|
|
239
|
+
// naming a rule "unnamed" tells the reader nothing, so it counts as absent
|
|
240
|
+
// and the reason takes over. Whitespace is collapsed either way: both are
|
|
241
|
+
// prose that may wrap, and this report is one line per file.
|
|
242
|
+
// Collapse to one line, and escape the delimiter. A `.because()` reason is
|
|
243
|
+
// arbitrary prose, so one containing a quoted term rendered as
|
|
244
|
+
// `("ignore the "legacy" path")` — three quotes before the paren, and no
|
|
245
|
+
// way for a reader to see where the label ends. Escaping keeps the
|
|
246
|
+
// author's words exact where replacing them would not.
|
|
247
|
+
const oneLine = (t) => t.replace(/\s+/g, ' ').trim().replace(/"/g, '\\"');
|
|
248
|
+
const described = ctx.describe?.();
|
|
249
|
+
const label = described !== undefined && described !== 'unnamed' && described !== ''
|
|
250
|
+
? oneLine(described)
|
|
251
|
+
: ctx.reason === undefined
|
|
252
|
+
? undefined
|
|
253
|
+
: oneLine(ctx.reason);
|
|
254
|
+
const named = label === undefined || label === '' ? '' : ` ("${label}")`;
|
|
255
|
+
for (const [file, lines] of byFile) {
|
|
256
|
+
const where = lines.length === 1 ? `line ${String(lines[0])}` : `lines ${lines.join(', ')}`;
|
|
257
|
+
writeStderr(`[eess] This rule${named} declares no id, so no exclusion comment can apply to it — ` +
|
|
258
|
+
`a comment matches a violation by rule id. ${file} has a directive at ${where}. ` +
|
|
259
|
+
`If one was meant for this rule, give the rule an id with .rule({ id: '<your-id>' }); ` +
|
|
260
|
+
`directives naming other rules are not this rule's to honour.`);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
// The waiver applied; this takes the suppressed finding's place, so the
|
|
264
|
+
// author is told what to fix rather than shown the violation they waived.
|
|
265
|
+
//
|
|
266
|
+
// Unsuppressable, because a suppression mechanism that can suppress the
|
|
267
|
+
// complaint about itself is not a mechanism.
|
|
268
|
+
//
|
|
269
|
+
// `undocumented` is only ever populated when the rule HAS an id (the push
|
|
270
|
+
// above is guarded on it), so this loop is unreachable without one — the
|
|
271
|
+
// local re-binding is what tells the compiler that after bug 0255 removed
|
|
272
|
+
// the outer `ctx.metadata?.id` gate.
|
|
273
|
+
for (const warning of undocumented) {
|
|
274
|
+
if (ruleId === undefined)
|
|
275
|
+
continue;
|
|
276
|
+
result.push({
|
|
277
|
+
rule: ruleId,
|
|
278
|
+
ruleId,
|
|
279
|
+
element: `${ruleId}@${warning.file}:${String(warning.line)}`,
|
|
280
|
+
file: warning.file,
|
|
281
|
+
line: warning.line,
|
|
282
|
+
message: `This exclusion states no reason, so nothing records why the rule is ` +
|
|
283
|
+
`waived here — and it is silently suppressing a real finding.`,
|
|
284
|
+
suggestion: `Add a reason: // eess-exclude ${ruleId}: <why>. ` +
|
|
285
|
+
`A reason is prose and nothing verifies it, so this raises the cost of a ` +
|
|
286
|
+
`suppression rather than preventing one — the audience is the reviewer ` +
|
|
287
|
+
`reading the diff. If the exemption is not justifiable, delete it and fix ` +
|
|
288
|
+
`the finding instead. ${UNSUPPRESSABLE}`,
|
|
289
|
+
severity: 'error',
|
|
290
|
+
bypassFilters: true,
|
|
291
|
+
});
|
|
128
292
|
}
|
|
129
293
|
}
|
|
130
294
|
return result;
|
|
@@ -133,6 +297,16 @@ export function applyFilters(violations, ctx) {
|
|
|
133
297
|
* Execute the terminal "check" action: apply options, format, throw on violations.
|
|
134
298
|
*/
|
|
135
299
|
export function executeCheck(violations, ctx, options) {
|
|
300
|
+
// The evidence survives every filter below. Baseline and `--changed` remove
|
|
301
|
+
// violations, never units examined: a run that examined 900 files and had its
|
|
302
|
+
// findings baselined away examined 900 files, and reporting 0 there would be
|
|
303
|
+
// the denominator lie bug 0174 is about.
|
|
304
|
+
const evidence = {
|
|
305
|
+
examined: violations.examined,
|
|
306
|
+
sourceEmpty: violations.sourceEmpty,
|
|
307
|
+
declaredEmpty: violations.declaredEmpty,
|
|
308
|
+
deadGlob: violations.deadGlob,
|
|
309
|
+
};
|
|
136
310
|
let filtered = applyFilters(violations, ctx);
|
|
137
311
|
if (options?.baseline) {
|
|
138
312
|
filtered = options.baseline.filterNew(filtered);
|
|
@@ -146,7 +320,10 @@ export function executeCheck(violations, ctx, options) {
|
|
|
146
320
|
}
|
|
147
321
|
if (filtered.length > 0) {
|
|
148
322
|
// One emitter for both paths (plan 0070) — text/json/github, then throw.
|
|
149
|
-
reportViolations(filtered,
|
|
323
|
+
reportViolations(collectResult(filtered, evidence), {
|
|
324
|
+
format: options?.format,
|
|
325
|
+
reason: ctx.reason,
|
|
326
|
+
});
|
|
150
327
|
throw new ArchRuleError(filtered, ctx.reason);
|
|
151
328
|
}
|
|
152
329
|
}
|
package/dist/execute-rule.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-rule.js","sourceRoot":"","sources":["../src/execute-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"execute-rule.js","sourceRoot":"","sources":["../src/execute-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AAExB,OAAO,EAAsB,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,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AM,CAAC,KAAK,OAAO,CAAC,CAAA;IAC5E,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,aAAa,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAChD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursive file discovery, shared by the dialects that read a directory tree
|
|
3
|
+
* rather than a TypeScript project.
|
|
4
|
+
*
|
|
5
|
+
* `eess-md` and `eess-crossvalidate` each carried a copy of this — measured at
|
|
6
|
+
* 99% similar, differing only in whether the ignore set arrived as a parameter
|
|
7
|
+
* or sat in a module constant. `toPosix` was duplicated alongside it, byte for
|
|
8
|
+
* byte.
|
|
9
|
+
*
|
|
10
|
+
* Kernel-safe: node builtins only, no project and no AST.
|
|
11
|
+
*/
|
|
12
|
+
/** Path separators normalised to `/`, so a corpus reads the same on Windows. */
|
|
13
|
+
export declare function toPosix(p: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Every file under `dir`, as paths relative to `root`, POSIX-separated.
|
|
16
|
+
*
|
|
17
|
+
* An unreadable directory — permissions, a dangling symlink — is skipped rather
|
|
18
|
+
* than thrown from: a corpus walk that dies on one bad entry reports nothing
|
|
19
|
+
* about the tree it could read, which is the worse failure for a gate.
|
|
20
|
+
*/
|
|
21
|
+
export declare function walkFiles(dir: string, root: string, ignoreDirs: ReadonlySet<string>): string[];
|
|
22
|
+
//# sourceMappingURL=file-walk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-walk.d.ts","sourceRoot":"","sources":["../src/file-walk.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AAEH,gFAAgF;AAChF,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAI9F"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { readdirSync } from 'node:fs';
|
|
2
|
+
import { join, relative, sep } from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* Recursive file discovery, shared by the dialects that read a directory tree
|
|
5
|
+
* rather than a TypeScript project.
|
|
6
|
+
*
|
|
7
|
+
* `eess-md` and `eess-crossvalidate` each carried a copy of this — measured at
|
|
8
|
+
* 99% similar, differing only in whether the ignore set arrived as a parameter
|
|
9
|
+
* or sat in a module constant. `toPosix` was duplicated alongside it, byte for
|
|
10
|
+
* byte.
|
|
11
|
+
*
|
|
12
|
+
* Kernel-safe: node builtins only, no project and no AST.
|
|
13
|
+
*/
|
|
14
|
+
/** Path separators normalised to `/`, so a corpus reads the same on Windows. */
|
|
15
|
+
export function toPosix(p) {
|
|
16
|
+
return sep === '/' ? p : p.split(sep).join('/');
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Every file under `dir`, as paths relative to `root`, POSIX-separated.
|
|
20
|
+
*
|
|
21
|
+
* An unreadable directory — permissions, a dangling symlink — is skipped rather
|
|
22
|
+
* than thrown from: a corpus walk that dies on one bad entry reports nothing
|
|
23
|
+
* about the tree it could read, which is the worse failure for a gate.
|
|
24
|
+
*/
|
|
25
|
+
export function walkFiles(dir, root, ignoreDirs) {
|
|
26
|
+
const acc = [];
|
|
27
|
+
walkInto(dir, root, ignoreDirs, acc);
|
|
28
|
+
return acc;
|
|
29
|
+
}
|
|
30
|
+
function walkInto(dir, root, ignoreDirs, acc) {
|
|
31
|
+
let entries;
|
|
32
|
+
try {
|
|
33
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
void err; // unreadable dir (permissions, dangling symlink) — deliberately skipped
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
for (const e of entries) {
|
|
40
|
+
const abs = join(dir, e.name);
|
|
41
|
+
if (e.isDirectory()) {
|
|
42
|
+
if (ignoreDirs.has(e.name))
|
|
43
|
+
continue;
|
|
44
|
+
walkInto(abs, root, ignoreDirs, acc);
|
|
45
|
+
}
|
|
46
|
+
else if (e.isFile()) {
|
|
47
|
+
acc.push(toPosix(relative(root, abs)));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=file-walk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-walk.js","sourceRoot":"","sources":["../src/file-walk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAE/C;;;;;;;;;;GAUG;AAEH,gFAAgF;AAChF,MAAM,UAAU,OAAO,CAAC,CAAS;IAC/B,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACjD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW,EAAE,IAAY,EAAE,UAA+B;IAClF,MAAM,GAAG,GAAa,EAAE,CAAA;IACxB,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,CAAA;IACpC,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,SAAS,QAAQ,CAAC,GAAW,EAAE,IAAY,EAAE,UAA+B,EAAE,GAAa;IACzF,IAAI,OAAO,CAAA;IACX,IAAI,CAAC;QACH,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;IACrD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,KAAK,GAAG,CAAA,CAAC,wEAAwE;QACjF,OAAM;IACR,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAA;QAC7B,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;YACpB,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;gBAAE,SAAQ;YACpC,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,CAAA;QACtC,CAAC;aAAM,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;YACtB,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAA;QACxC,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/format-json.d.ts
CHANGED
|
@@ -56,6 +56,17 @@ export interface ArchJsonViolation {
|
|
|
56
56
|
readonly docs: string | null;
|
|
57
57
|
readonly codeFrame: string | null;
|
|
58
58
|
readonly measured: number | null;
|
|
59
|
+
/**
|
|
60
|
+
* Other files this one finding concerns, or `null` when it concerns only its
|
|
61
|
+
* own (bug 0239).
|
|
62
|
+
*
|
|
63
|
+
* A finding about a RELATIONSHIP — two duplicate bodies, a cluster of them —
|
|
64
|
+
* is reported at one file and is about several. A consumer that filters by
|
|
65
|
+
* `file` alone will hide it from whoever edited any of the others, which is
|
|
66
|
+
* the bug this field exists to stop being reproduced downstream. If you
|
|
67
|
+
* filter, read this too.
|
|
68
|
+
*/
|
|
69
|
+
readonly relatedFiles: readonly string[] | null;
|
|
59
70
|
}
|
|
60
71
|
/** One finding removed by an inline `// eess-exclude` comment. */
|
|
61
72
|
export interface ArchJsonSuppression {
|
|
@@ -75,6 +86,8 @@ export interface ArchJsonReport {
|
|
|
75
86
|
readonly errors: number;
|
|
76
87
|
readonly warnings: number;
|
|
77
88
|
readonly reason: string | null;
|
|
89
|
+
/** Units examined — `null` when the caller supplied no evidence. */
|
|
90
|
+
readonly examined: number | null;
|
|
78
91
|
};
|
|
79
92
|
readonly untestedAllowlists: readonly ArchJsonUntestedAllowlist[];
|
|
80
93
|
readonly commentSuppressed: readonly ArchJsonSuppression[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-json.d.ts","sourceRoot":"","sources":["../src/format-json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"format-json.d.ts","sourceRoot":"","sources":["../src/format-json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGtD;;;;;;;;GAQG;AACH;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,kGAAkG;IAClG,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,CAAA;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI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|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { hasEvidence } from './collect-result.js';
|
|
1
2
|
import { commentSuppressions } from './comment-suppression.js';
|
|
2
3
|
export function formatViolationsJson(violations, reason,
|
|
3
4
|
/**
|
|
@@ -17,6 +18,22 @@ untested = []) {
|
|
|
17
18
|
errors,
|
|
18
19
|
warnings: violations.length - errors,
|
|
19
20
|
reason: reason ?? null,
|
|
21
|
+
/**
|
|
22
|
+
* The denominator, carried by hand — plan 0235.
|
|
23
|
+
*
|
|
24
|
+
* `JSON.stringify` DROPS an array's own properties: an `ArchViolation[]`
|
|
25
|
+
* carrying `examined` serialises as a bare `[…]` and the evidence is
|
|
26
|
+
* simply gone. Measured: `JSON.stringify(Object.assign([1,2],{examined:7}))`
|
|
27
|
+
* is `[1,2]`.
|
|
28
|
+
*
|
|
29
|
+
* Without this line `--format json` would carry violations and no
|
|
30
|
+
* denominator, which forecloses the machine-readable half of
|
|
31
|
+
* [bug 0174](../../../work/bugs/0174-eess-ts-reports-a-clean-gate-with-no-denominator.md)
|
|
32
|
+
* — a green with no way for a consumer to tell a clean run from one that
|
|
33
|
+
* examined nothing. `null` when the caller handed over a bare array, which
|
|
34
|
+
* is itself the honest answer: no evidence was supplied.
|
|
35
|
+
*/
|
|
36
|
+
examined: hasEvidence(violations) ? violations.examined : null,
|
|
20
37
|
},
|
|
21
38
|
// Bug 0015: an allowlist constrains edges, so a subject with none passes
|
|
22
39
|
// whatever the allowlist says. Reported rather than failed — for the `only*`
|
|
@@ -84,6 +101,13 @@ untested = []) {
|
|
|
84
101
|
// the number has to regex it back out of the message — which is the
|
|
85
102
|
// fragility bug 0012 was filed about.
|
|
86
103
|
measured: v.measured ?? null,
|
|
104
|
+
// Bug 0239. A finding about a relationship concerns several files and is
|
|
105
|
+
// reported at one of them; a consumer that filters by `file` needs the
|
|
106
|
+
// rest or it reproduces the very bug this field was added to fix. This is
|
|
107
|
+
// the documented agent-actionable stream, so omitting it would make the
|
|
108
|
+
// changeset's own advice — "read `relatedFiles` too" — impossible to
|
|
109
|
+
// follow through the interface CLAUDE.md points agents at.
|
|
110
|
+
relatedFiles: v.relatedFiles ?? null,
|
|
87
111
|
})),
|
|
88
112
|
};
|
|
89
113
|
return JSON.stringify(output, null, 2);
|
package/dist/format-json.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-json.js","sourceRoot":"","sources":["../src/format-json.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"format-json.js","sourceRoot":"","sources":["../src/format-json.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAmG9D,MAAM,UAAU,oBAAoB,CAClC,UAA2B,EAC3B,MAAe;AACf;;;;;;;;GAQG;AACH,WAAoC,EAAE;IAEtC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC,MAAM,CAAA;IACnF,MAAM,MAAM,GAAG;QACb,OAAO,EAAE;YACP,KAAK,EAAE,UAAU,CAAC,MAAM;YACxB,MAAM;YACN,QAAQ,EAAE,UAAU,CAAC,MAAM,GAAG,MAAM;YACpC,MAAM,EAAE,MAAM,IAAI,IAAI;YACtB;;;;;;;;;;;;;;eAcG;YACH,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI;SAC/D;QACD,yEAAyE;QACzE,6EAA6E;QAC7E,0EAA0E;QAC1E,4EAA4E;QAC5E,0EAA0E;QAC1E,qCAAqC;QACrC,kBAAkB,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACvC,IAAI,EAAE,CAAC,CAAC,IAAI;YAC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a,KAAK,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW;YAC9D,OAAO,EAAE,CAAC,CAAC,OAAO;YAClB,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,IAAI;YAC1B,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,IAAI;YAChC,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI;YACpB,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,IAAI;YAC9B,iEAAiE;YACjE,0EAA0E;YAC1E,oEAAoE;YACpE,sCAAsC;YACtC,QAAQ,EAAE,CAAC,CAAC,QAAQ,IAAI,IAAI;YAC5B,yEAAyE;YACzE,uEAAuE;YACvE,0EAA0E;YAC1E,wEAAwE;YACxE,qEAAqE;YACrE,2DAA2D;YAC3D,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,IAAI;SACrC,CAAC,CAAC;KACJ,CAAA;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AACxC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,17 +3,14 @@ export type { Condition, ConditionContext } from './condition.js';
|
|
|
3
3
|
export { not, and, or } from './combinators.js';
|
|
4
4
|
export type { Matcher } from './combinators.js';
|
|
5
5
|
export type { ArchViolation, ArchFix } from './violation.js';
|
|
6
|
-
export { byCodepoint, severityFor, remedyRepeatsMessage } from './violation.js';
|
|
7
|
-
export { applyFixes } from './apply-fixes.js';
|
|
8
|
-
export type { ApplyResult } from './apply-fixes.js';
|
|
9
|
-
export { UNSUPPRESSABLE } from './unsuppressable.js';
|
|
10
6
|
export { RuleBuilder } from './rule-builder.js';
|
|
11
7
|
export { TerminalBuilder } from './terminal-builder.js';
|
|
12
|
-
export type { CollectResult } from './
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export { ArchRuleError } from './errors.js';
|
|
8
|
+
export type { CollectResult, Evidence } from './collect-result.js';
|
|
9
|
+
export { collectResult, mergeCollectResults, hasEvidence } from './collect-result.js';
|
|
10
|
+
export { EMITTER_NO_RECEIPT, EMITTER_PASS_WITHOUT_EVIDENCE, EMITTER_EXPIRED_DECLARATION, EMITTER_CONTRADICTORY_EVIDENCE, EMITTER_SOURCE_EMPTY, } from './emitter-findings.js';
|
|
11
|
+
export { assertsCardinality } from './cardinality.js';
|
|
12
|
+
export { ArchRuleError, isArchRuleError, ArchConfigError, isArchConfigError } from './errors.js';
|
|
13
|
+
export type { PathUniverse } from './path-universe.js';
|
|
17
14
|
export type { RuleMetadata } from './rule-metadata.js';
|
|
18
15
|
export type { RuleDescription } from './rule-description.js';
|
|
19
16
|
export { generateCodeFrame } from './code-frame.js';
|
|
@@ -25,56 +22,27 @@ export { formatViolationsGitHub } from './format-github.js';
|
|
|
25
22
|
export type { CheckOptions, OutputFormat, BaselineFilter, DiffFilterLike } from './check-options.js';
|
|
26
23
|
export { detectFormat, isCI } from './environment.js';
|
|
27
24
|
export { definePredicate, defineCondition } from './define.js';
|
|
28
|
-
export { dispatchRule, validateOverrides
|
|
29
|
-
export { reportViolations, finishPreset
|
|
25
|
+
export { dispatchRule, validateOverrides } from './preset-dispatch.js';
|
|
26
|
+
export { reportViolations, finishPreset } from './report.js';
|
|
30
27
|
export type { ReportMode, ReportOptions, PresetReportOptions } from './report.js';
|
|
31
28
|
export type { RuleSeverity, PresetBaseOptions } from './preset-dispatch.js';
|
|
32
|
-
export {
|
|
33
|
-
export type { Pair, MatchResult, MatchOptions } from './matching.js';
|
|
29
|
+
export type { Dispatchable } from './preset-dispatch.js';
|
|
34
30
|
export { correspondence, CorrespondenceBuilder } from './correspondence.js';
|
|
35
|
-
export type { Selection, ElementInfo, Direction
|
|
36
|
-
export {
|
|
37
|
-
export { escapeGitHub } from './format-github.js';
|
|
38
|
-
export { hashViolation } from './baseline.js';
|
|
39
|
-
export { discoverIdentityRoot, normalizeIdentityText } from './identity-root.js';
|
|
40
|
-
export { writeStderr } from './stderr.js';
|
|
41
|
-
export { bold, red, dim, yellow, cyan, gray } from './ansi.js';
|
|
31
|
+
export type { Selection, ElementInfo, Direction } from './correspondence.js';
|
|
32
|
+
export type { RelationSpec, CorrespondenceOptions, KeyBy } from './correspondence.js';
|
|
42
33
|
export { parseExclusionComments, isExcludedByComment } from './exclusion-comments.js';
|
|
43
|
-
export type { ExclusionComment, ExclusionWarning, ParseResult } from './exclusion-comments.js';
|
|
44
|
-
export { silent
|
|
34
|
+
export type { ExclusionComment, ExclusionWarning, ParseResult, MaskNonComment, ParseExclusionOptions, } from './exclusion-comments.js';
|
|
35
|
+
export { silent } from './silent-exclusion.js';
|
|
45
36
|
export type { SilentExclusion } from './silent-exclusion.js';
|
|
46
37
|
export { withBaseline, generateBaseline, Baseline } from './baseline.js';
|
|
47
38
|
export type { BaselineEntry, BaselineFile } from './baseline.js';
|
|
48
39
|
export { collectViolations } from './baseline-generator.js';
|
|
49
40
|
export { diffAware, DiffFilter } from './diff-aware.js';
|
|
50
|
-
export { recordEdgeCoverage, untestedRules, edgeCoverageNotice, resetEdgeCoverage, } from './edge-coverage.js';
|
|
51
41
|
export type { UntestedReason, EdgeCoverage } from './edge-coverage.js';
|
|
52
42
|
export type { GlobKind, GlobPosition, GlobBase, DeclaredGlob, GlobSite, OpaqueGlob, GlobLeaf, GlobTree, DeclaredGlobs, GlobNode, } from './glob-site.js';
|
|
53
|
-
export { isFaultPosition, countDeclaredGlobs, isGlobNode, isOpaqueGlob, globAnyOf, globNode, stampGlobs, negateGlobs, combineGlobs, } from './glob-site.js';
|
|
54
|
-
export type { PathUniverse } from './path-universe.js';
|
|
55
|
-
export { viewsFor } from './path-universe.js';
|
|
56
|
-
export type { OnDisk, DiskSet } from './disk-set.js';
|
|
57
|
-
export { isAnchored, isProjectRelative } from './project-relative.js';
|
|
58
|
-
export { isRecord, isNullaryCallable } from './type-guards.js';
|
|
59
|
-
export { shallowClone } from './shallow-clone.js';
|
|
60
|
-
export { suppressionNotice, activeNotice, resetDiffDisclosureForTests } from './diff-disclosure.js';
|
|
61
|
-
export { resetCommentSuppression, recordCommentSuppression, commentSuppressions, commentSuppressionNotice, } from './comment-suppression.js';
|
|
62
|
-
export { dedupeConfigFindings } from './dedupe-config-findings.js';
|
|
63
|
-
export { assertionLessViolation } from './terminal-builder.js';
|
|
64
|
-
export { toPortablePath } from './identity-root.js';
|
|
65
|
-
export type { Describable } from './rule-description.js';
|
|
66
|
-
export { isDescribable } from './rule-description.js';
|
|
67
|
-
export { resetStderrGuardForTests } from './stderr.js';
|
|
68
|
-
export { DECLARE_INSTEAD } from './unsuppressable.js';
|
|
69
|
-
export { UNSUPPRESSABLE_MECHANISMS } from './unsuppressable.js';
|
|
70
|
-
export { subjectOf } from './violation.js';
|
|
71
|
-
export { identityCollisions } from './violation.js';
|
|
72
|
-
export { resetIdentityCollisions } from './violation.js';
|
|
73
|
-
export { disambiguateIdentities } from './violation.js';
|
|
74
|
-
export { isArchRuleError } from './errors.js';
|
|
75
43
|
export type { ArchJsonViolation, ArchJsonSuppression, ArchJsonUntestedAllowlist, ArchJsonReport, } from './format-json.js';
|
|
76
44
|
export type { CorrespondenceResult } from './correspondence-core.js';
|
|
77
45
|
export { setCorrespondence } from './correspondence-core.js';
|
|
78
|
-
export { marksOwnEmptyDiscovery, ownsEmptyDiscovery } from './owns-empty-discovery.js';
|
|
79
46
|
export type { RuleBuilderLike } from './rule-builder-like.js';
|
|
47
|
+
export { globAnyOf, globNode } from './glob-site.js';
|
|
80
48
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,EAAE,GAAG,EAAE,GA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