@kongyo2/ts-comment-scanner 1.20.0 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +240 -52
  2. package/dist/args.d.ts.map +1 -1
  3. package/dist/args.js +23 -19
  4. package/dist/args.js.map +1 -1
  5. package/dist/astgrep.d.ts +5 -3
  6. package/dist/astgrep.d.ts.map +1 -1
  7. package/dist/astgrep.js +10 -12
  8. package/dist/astgrep.js.map +1 -1
  9. package/dist/containers.d.ts +48 -0
  10. package/dist/containers.d.ts.map +1 -0
  11. package/dist/containers.js +82 -0
  12. package/dist/containers.js.map +1 -0
  13. package/dist/coverage.d.ts +45 -0
  14. package/dist/coverage.d.ts.map +1 -0
  15. package/dist/coverage.js +92 -0
  16. package/dist/coverage.js.map +1 -0
  17. package/dist/directives.d.ts +21 -3
  18. package/dist/directives.d.ts.map +1 -1
  19. package/dist/directives.js +31 -23
  20. package/dist/directives.js.map +1 -1
  21. package/dist/files.d.ts +7 -3
  22. package/dist/files.d.ts.map +1 -1
  23. package/dist/files.js +129 -82
  24. package/dist/files.js.map +1 -1
  25. package/dist/imports.d.ts.map +1 -1
  26. package/dist/imports.js +14 -8
  27. package/dist/imports.js.map +1 -1
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/jsx.d.ts.map +1 -1
  33. package/dist/jsx.js +5 -6
  34. package/dist/jsx.js.map +1 -1
  35. package/dist/lines.d.ts +24 -5
  36. package/dist/lines.d.ts.map +1 -1
  37. package/dist/lines.js +50 -16
  38. package/dist/lines.js.map +1 -1
  39. package/dist/ranges.d.ts +8 -0
  40. package/dist/ranges.d.ts.map +1 -1
  41. package/dist/ranges.js +12 -0
  42. package/dist/ranges.js.map +1 -1
  43. package/dist/remove.d.ts +18 -14
  44. package/dist/remove.d.ts.map +1 -1
  45. package/dist/remove.js +69 -630
  46. package/dist/remove.js.map +1 -1
  47. package/dist/run.d.ts.map +1 -1
  48. package/dist/run.js +21 -28
  49. package/dist/run.js.map +1 -1
  50. package/dist/scanner.d.ts +34 -0
  51. package/dist/scanner.d.ts.map +1 -1
  52. package/dist/scanner.js +137 -31
  53. package/dist/scanner.js.map +1 -1
  54. package/dist/shields.d.ts +72 -0
  55. package/dist/shields.d.ts.map +1 -0
  56. package/dist/shields.js +624 -0
  57. package/dist/shields.js.map +1 -0
  58. package/dist/splice.d.ts +42 -11
  59. package/dist/splice.d.ts.map +1 -1
  60. package/dist/splice.js +189 -56
  61. package/dist/splice.js.map +1 -1
  62. package/package.json +2 -1
  63. package/src/args.ts +21 -21
  64. package/src/astgrep.ts +11 -13
  65. package/src/containers.ts +128 -0
  66. package/src/coverage.ts +110 -0
  67. package/src/directives.ts +38 -20
  68. package/src/files.ts +169 -91
  69. package/src/imports.ts +15 -8
  70. package/src/index.ts +1 -0
  71. package/src/jsx.ts +5 -6
  72. package/src/lines.ts +55 -14
  73. package/src/ranges.ts +17 -0
  74. package/src/remove.ts +82 -730
  75. package/src/run.ts +22 -34
  76. package/src/scanner.ts +180 -32
  77. package/src/shields.ts +701 -0
  78. package/src/splice.ts +224 -60
@@ -0,0 +1,624 @@
1
+ import { astGrepReach, rowStartOffsets } from "./astgrep.js";
2
+ import { commentsOf, removalUnits } from "./containers.js";
3
+ import { hintsNextNode, monocartLines, opensRow, textHints } from "./coverage.js";
4
+ import { carriesAstGrepSuppression } from "./directives.js";
5
+ import { closesItsLine, isBlank, lineIndexAt, lineStartOffsets, occupiesWholeLines, opensItsLine } from "./lines.js";
6
+ import { byStart, firstIndexAtOrAfter, rangeAt } from "./ranges.js";
7
+ /**
8
+ * Finds what the directives that stay need the removal to leave in place,
9
+ * so that each applies to the same code afterwards, and keeps the comments
10
+ * among it.
11
+ *
12
+ * Most directives reach lines: the line below a next-line directive
13
+ * (`@ts-expect-error`, `eslint-disable-next-line`, ...), the lines a line
14
+ * directive (`eslint-disable-line`, `nosemgrep` after code, ...) stands on,
15
+ * the lines a coverage hint counts. Those lines are shielded: emptied, one
16
+ * stays as an empty line, and none is joined to another — the removal edits
17
+ * see to both (see ShieldedLines), so the comments on them go all the same.
18
+ * Only a comment-only JSX container that would join such a line keeps its
19
+ * comments, as a line break in its place would change what the element
20
+ * renders. To the tools that only a line feed ends a line for (oxlint,
21
+ * Semgrep, ast-grep, c8, Node's test runner), a directive reaches rows that
22
+ * can run over several of those lines, and their lines are shielded as well.
23
+ *
24
+ * Other directives are read with the comments around them, and there a
25
+ * comment has to stay:
26
+ *
27
+ * - below a tsc suppression, the first line each compiler cannot step over
28
+ * in front of the code (see tscReach);
29
+ * - between a directive that only counts as the last comment before its
30
+ * target (`@deno-types`, a fall-through comment, ...), or a coverage hint
31
+ * that ast-v8-to-istanbul only applies to the node right after it, and
32
+ * that target, one comment (see Gap);
33
+ * - in front of a directive that reaches the lines below only where it
34
+ * opens its row, one comment that keeps it from opening it, where those
35
+ * lines hold code (see Front);
36
+ * - a JSX comment container right after a directive in a container
37
+ * (`{/* prettier-ignore *​/}`, which applies to the next sibling);
38
+ * - the last JSDoc comment of a node in JavaScript, where an earlier one
39
+ * that stays holds tags it keeps off the node;
40
+ * - what an ast-grep suppression is keyed to (see astGrepReach).
41
+ *
42
+ * Each directive a comment carries shields what it reaches, whichever one
43
+ * names the comment. Runs to a fixpoint because a comment kept here can
44
+ * itself be a directive (when directives are being removed selectively).
45
+ */
46
+ export function shieldDirectives(source, removed, kept, skipped, context) {
47
+ const lineOffsets = lineStartOffsets(source);
48
+ const totalLines = lineOffsets.length;
49
+ const shieldedLines = new Set();
50
+ const blockingLines = new Set();
51
+ const gaps = [];
52
+ const fronts = [];
53
+ const siblingTargets = new Set();
54
+ const rowTails = [];
55
+ const shadows = new Set();
56
+ const astGrepReaches = [];
57
+ const processed = new Set();
58
+ // The hints c8 and Node find in the text, until the comment holding one is known to stay.
59
+ let pendingHints = source.includes("ignore next") ? textHints(source) : [];
60
+ // Where a comment tsc reads a suppression from ends: tsc stops there on its
61
+ // way up from a diagnostic, as it does at a line it cannot step over.
62
+ const suppressions = new Map();
63
+ for (const [comment, names] of context.directives) {
64
+ if (names.some((name) => TSC_SUPPRESSIONS.has(name))) {
65
+ suppressions.set(comment.endLine, [...(suppressions.get(comment.endLine) ?? []), comment]);
66
+ }
67
+ }
68
+ let stillRemoved = removed;
69
+ const removing = new Set(removed);
70
+ let units;
71
+ const currentUnits = () => (units ??= removalUnits(stillRemoved, context.containerOf));
72
+ let rows;
73
+ const rowOffsets = () => (rows ??= rowStartOffsets(source));
74
+ /** The (1-based) line holding the offset. */
75
+ const lineOf = (offset) => lineIndexAt(lineOffsets, offset) + 1;
76
+ /** The given (1-based) line, which the shields only name when the source has it, and the units on it. */
77
+ const unitsOnLine = (line) => {
78
+ const start = lineOffsets[line - 1];
79
+ const end = lineOffsets[line] ?? source.length;
80
+ return { start, end, units: currentUnits().filter((unit) => unit.start < end && unit.end > start) };
81
+ };
82
+ /** Whether the lines (1-based, inclusive, each one the source has) hold nothing but whitespace and comments. */
83
+ const holdNoCode = (from, to) => {
84
+ const end = lineOffsets[to] ?? source.length;
85
+ for (let index = lineOffsets[from - 1]; index < end; index += 1) {
86
+ const comment = rangeAt(context.comments, index);
87
+ if (comment !== undefined)
88
+ index = comment.end - 1;
89
+ else if (!isBlank(source[index]))
90
+ return false;
91
+ }
92
+ return true;
93
+ };
94
+ let added = false;
95
+ const shieldLines = (from, to) => {
96
+ for (let line = from; line <= Math.min(to, totalLines); line += 1) {
97
+ if (shieldedLines.has(line))
98
+ continue;
99
+ shieldedLines.add(line);
100
+ added = true;
101
+ }
102
+ };
103
+ /** Shields the lines of the rows (0-based, inclusive) that only a line feed ends. */
104
+ const shieldRows = (from, to) => {
105
+ const offsets = rowOffsets();
106
+ const start = offsets[from];
107
+ if (start !== undefined)
108
+ shieldLines(lineOf(start), lineOf((offsets[to + 1] ?? source.length) - 1));
109
+ };
110
+ /** Collects what one of the directives the comment carries reaches. */
111
+ const shieldReach = (comment, directive) => {
112
+ const lastComment = isLastCommentDirective(comment, directive);
113
+ const cast = CAST_DIRECTIVES.has(directive) && context.casts.has(comment);
114
+ if (lastComment || cast || (NEXT_TOKEN_DIRECTIVES.has(directive) && hintsNextNode(comment.text))) {
115
+ const codeStart = codeStartAfter(source, comment.end, context.skippable);
116
+ if (codeStart > comment.end && codeStart < source.length) {
117
+ gaps.push({
118
+ start: comment.end,
119
+ end: codeStart,
120
+ stays: lastComment || cast ? "last" : "first",
121
+ line: comment.endLine,
122
+ });
123
+ added = true;
124
+ }
125
+ if (lastComment)
126
+ return;
127
+ }
128
+ if (TSC_SUPPRESSIONS.has(directive)) {
129
+ const reach = tscReach(source, comment, lineOffsets, context.skippable, (line) => suppressions.get(line)?.map((suppression) => removing.has(suppression)));
130
+ for (const line of reach.blocking) {
131
+ if (blockingLines.has(line))
132
+ continue;
133
+ blockingLines.add(line);
134
+ added = true;
135
+ }
136
+ if (reach.target !== undefined)
137
+ shieldLines(reach.target, reach.target);
138
+ }
139
+ // The row the comment ends on, for the tools that only a line feed ends
140
+ // a line for (oxlint, Semgrep, tree-sitter, c8): a lone CR, U+2028 or
141
+ // U+2029 — a line break to tsc and ESLint — ends no row, so a row can run
142
+ // over several of the lines counted here.
143
+ const endRow = lineIndexAt(rowOffsets(), comment.end - 1);
144
+ // A line directive covers the lines it stands on, which no removal may
145
+ // join to another (see joiningUnits): its rows, to those tools.
146
+ if (coversOwnLine(directive))
147
+ shieldRows(lineIndexAt(rowOffsets(), comment.start), endRow);
148
+ if (!isNextLineDirective(directive))
149
+ return;
150
+ // In JSX, such a directive in braces applies to the sibling after it,
151
+ // whatever line that is on (prettier leaves the element after
152
+ // `{/* prettier-ignore */}` as is): a comment-only container standing
153
+ // between them has to stay. Range and file pragmas target no sibling.
154
+ const holder = context.containerOf.get(comment);
155
+ if (holder?.next !== undefined && !siblingTargets.has(holder.next)) {
156
+ siblingTargets.add(holder.next);
157
+ added = true;
158
+ }
159
+ // A trailing formatter or scanner suppression (`a = [1]; // oxfmt-ignore`,
160
+ // `secret(); // skipcq`) targets what it trails, not the line below it.
161
+ // In JSX, the container holding the comment is what has to stand on
162
+ // lines of its own.
163
+ if (TRAILING_TARGETS_OWN_LINE.has(directive) && !occupiesWholeLines(source, holder ?? comment))
164
+ return;
165
+ const below = rowOffsets()[endRow + 1];
166
+ if (directive === "nosemgrep") {
167
+ // Semgrep reads the rule ids of a `nosemgrep:` off the rest of the row,
168
+ // which runs on where a lone CR or U+2028 ends the comment's line: what
169
+ // stands there is part of the ids it reads.
170
+ const nextLine = lineOffsets[comment.endLine] ?? source.length;
171
+ if (nextLine < (below ?? source.length) && SEMGREP_RULE_IDS.test(comment.text)) {
172
+ rowTails.push({ start: nextLine, end: below ?? source.length });
173
+ added = true;
174
+ }
175
+ // Its reach is a matter of what precedes the marker on its row.
176
+ if (below !== undefined) {
177
+ const rowStart = rowOffsets()[endRow];
178
+ const ownRow = comment.text.slice(comment.text.lastIndexOf("\n") + 1);
179
+ fronts.push({
180
+ rowStart,
181
+ at: Math.max(rowStart, comment.start),
182
+ reaches: (prefix) => SEMGREP_PREVIOUS_LINE.test(prefix + ownRow),
183
+ from: lineOf(below),
184
+ to: lineOf((rowOffsets()[endRow + 2] ?? source.length) - 1),
185
+ });
186
+ added = true;
187
+ }
188
+ return;
189
+ }
190
+ // The line below the directive, and the row below it. oxlint covers the
191
+ // rest of the row a next-line comment ends on as well, up to the end of
192
+ // the row after it (`split_inclusive('\n')` and `lines()` in its
193
+ // `disable_directives.rs`); on the file's last row it covers the rest of
194
+ // the file, which no removal changes.
195
+ shieldLines(comment.endLine + 1, comment.endLine + 1);
196
+ if (below !== undefined) {
197
+ shieldLines(OXLINT_NEXT_LINE.has(directive) ? comment.endLine + 1 : lineOf(below), lineOf((rowOffsets()[endRow + 2] ?? source.length) - 1));
198
+ }
199
+ if (COUNTED_NEXT_LINE.has(directive)) {
200
+ // monocart counts the lines below the comment's last (see monocartLines).
201
+ const trailing = source.slice(comment.end, lineOffsets[comment.endLine] ?? source.length);
202
+ const counted = monocartLines(comment.kind, comment.text, trailing);
203
+ if (counted !== undefined)
204
+ shieldLines(comment.endLine + 1, comment.endLine + counted);
205
+ }
206
+ };
207
+ const collectShields = () => {
208
+ added = false;
209
+ for (const comment of [...kept, ...skipped]) {
210
+ if (processed.has(comment))
211
+ continue;
212
+ processed.add(comment);
213
+ const shadow = context.shadows.get(comment);
214
+ if (shadow !== undefined)
215
+ shadows.add(shadow);
216
+ if (comment.directive === undefined)
217
+ continue;
218
+ if (carriesAstGrepSuppression(comment.text)) {
219
+ const reach = astGrepReach(source, rowOffsets(), comment, context.preceding.get(comment));
220
+ astGrepReaches.push(reach);
221
+ if (reach.nextRow !== undefined && reach.nextRow.end > reach.nextRow.start) {
222
+ shieldLines(lineOf(reach.nextRow.start), lineOf(reach.nextRow.end - 1));
223
+ }
224
+ added = true;
225
+ }
226
+ for (const directive of context.directives.get(comment))
227
+ shieldReach(comment, directive);
228
+ }
229
+ // c8 ignores the row holding a hint, wherever on it, and from a hint that
230
+ // opens its row the rows below it that the hint counts; Node's test
231
+ // runner ignores the rows below it wherever it stands. A hint in a
232
+ // comment that goes, goes with it.
233
+ pendingHints = pendingHints.filter((hint) => {
234
+ const holder = rangeAt(context.comments, hint.offset);
235
+ if (holder !== undefined && removing.has(holder))
236
+ return true;
237
+ const offsets = rowOffsets();
238
+ const row = lineIndexAt(offsets, hint.offset);
239
+ shieldRows(row, row);
240
+ if (hint.nodeRows > 0)
241
+ shieldRows(row + 1, row + hint.nodeRows);
242
+ const below = offsets[row + 1];
243
+ if (below !== undefined) {
244
+ fronts.push({
245
+ rowStart: offsets[row],
246
+ at: hint.offset,
247
+ reaches: opensRow,
248
+ from: lineOf(below),
249
+ to: lineOf((offsets[row + hint.rows + 1] ?? source.length) - 1),
250
+ });
251
+ added = true;
252
+ }
253
+ return false;
254
+ });
255
+ return added;
256
+ };
257
+ /** Takes those of the comments that are still being removed out of the removal and keeps them. */
258
+ const protect = (group) => {
259
+ const staying = group.filter((comment) => removing.has(comment));
260
+ if (staying.length === 0)
261
+ return;
262
+ for (const comment of staying)
263
+ removing.delete(comment);
264
+ stillRemoved = stillRemoved.filter((comment) => removing.has(comment));
265
+ kept.push(...staying);
266
+ units = undefined;
267
+ };
268
+ /**
269
+ * Shields what a directive reaches below its row where it opens the row,
270
+ * and sees to it that the removal does not make it open one: with the
271
+ * comments in front of it gone, the directive would newly reach those
272
+ * lines. Where they hold no code, that changes nothing as long as they
273
+ * stay lines, so they are shielded as well; where they do, the comment in
274
+ * front that keeps the directive from opening its row stays.
275
+ */
276
+ const settleFront = (front) => {
277
+ const prefix = source.slice(front.rowStart, front.at);
278
+ if (!front.reaches(prefix)) {
279
+ const inFront = currentUnits().filter((unit) => unit.start < front.at && unit.end > front.rowStart);
280
+ /** The prefix once the units are deleted, all but `staying`. */
281
+ const without = (staying) => {
282
+ let text = "";
283
+ let cursor = front.rowStart;
284
+ for (const unit of inFront) {
285
+ if (unit === staying)
286
+ continue;
287
+ text += source.slice(cursor, Math.max(cursor, unit.start));
288
+ cursor = Math.min(front.at, unit.end);
289
+ }
290
+ return text + source.slice(cursor, front.at);
291
+ };
292
+ if (!front.reaches(without()))
293
+ return;
294
+ if (!holdNoCode(front.from, front.to)) {
295
+ protect(inFront.findLast((unit) => !front.reaches(without(unit))).comments);
296
+ return;
297
+ }
298
+ }
299
+ shieldLines(front.from, front.to);
300
+ };
301
+ /** Keeps the comment a gap needs, unless one that stays already serves. */
302
+ const settleGap = (gap) => {
303
+ const within = [];
304
+ for (let index = firstIndexAtOrAfter(context.comments, gap.start, (comment) => comment.start); (context.comments[index]?.start ?? gap.end) < gap.end; index += 1) {
305
+ within.push(context.comments[index]);
306
+ }
307
+ const first = within[0];
308
+ if (gap.stays === "last" || first === undefined) {
309
+ protect(within.slice(-1));
310
+ }
311
+ else {
312
+ // Any comment keeps ast-v8-to-istanbul's hint without a target. One on
313
+ // the hint's own line also keeps monocart from counting a line below
314
+ // the hint (see monocartLines), so where the first stands there, only a
315
+ // comment of that line serves.
316
+ const serving = first.line === gap.line ? within.filter((comment) => comment.line === gap.line) : within;
317
+ if (serving.every((comment) => removing.has(comment)))
318
+ protect([first]);
319
+ }
320
+ };
321
+ /** Protects what the shields collected so far hold in place; true when that kept anything. */
322
+ const protectShields = () => {
323
+ const removingBefore = stillRemoved.length;
324
+ for (const front of fronts)
325
+ settleFront(front);
326
+ // A comment that would join a shielded line to another leaves its line
327
+ // breaks behind; a container's braces have none to leave without
328
+ // changing what the element renders, so they stay.
329
+ for (const line of currentUnits().some((unit) => unit.braces) ? shieldedLines : []) {
330
+ for (const unit of joiningUnits(source, unitsOnLine(line))) {
331
+ if (unit.braces)
332
+ protect(unit.comments);
333
+ }
334
+ }
335
+ for (const line of blockingLines)
336
+ protect(lineOpeningGroup(source, unitsOnLine(line)));
337
+ for (const gap of gaps)
338
+ settleGap(gap);
339
+ protect([...shadows]);
340
+ for (const target of siblingTargets)
341
+ protect(target.comments);
342
+ for (const tail of rowTails) {
343
+ protect(commentsOf(currentUnits().filter((unit) => unit.start >= tail.start && unit.start < tail.end)));
344
+ }
345
+ for (const reach of astGrepReaches)
346
+ protect(commentsOf(currentUnits().filter((unit) => reach.holds(unit))));
347
+ return stillRemoved.length < removingBefore;
348
+ };
349
+ collectShields();
350
+ while (protectShields()) {
351
+ if (!collectShields())
352
+ break;
353
+ }
354
+ if (stillRemoved.length !== removed.length) {
355
+ kept.sort(byStart);
356
+ }
357
+ return { removed: stillRemoved, lines: shieldedLines };
358
+ }
359
+ /**
360
+ * Offset of the first character at or after `from` that is neither
361
+ * whitespace nor inside one of the (sorted, non-overlapping) ranges, or the
362
+ * source length when only ranges follow. `from` lies past the start of at
363
+ * least one range (the directive the search is for); when the closest of
364
+ * them runs past `from` — a block comment opened on the directive's line —
365
+ * the search resumes at its end.
366
+ */
367
+ function codeStartAfter(source, from, ranges) {
368
+ let next = firstIndexAtOrAfter(ranges, from, (range) => range.start);
369
+ let index = Math.max(from, ranges[next - 1].end);
370
+ while (index < source.length) {
371
+ const range = ranges[next];
372
+ if (range !== undefined && range.start === index) {
373
+ index = range.end;
374
+ next += 1;
375
+ }
376
+ else if (isBlank(source[index])) {
377
+ index += 1;
378
+ }
379
+ else {
380
+ return index;
381
+ }
382
+ }
383
+ return source.length;
384
+ }
385
+ /**
386
+ * What a tsc suppression needs left in place below it. Looking for the
387
+ * suppression a diagnostic falls under, a compiler goes up from the
388
+ * diagnostic's line over the lines it reads as blank or as a `//` comment
389
+ * (see TSC_PASSABLE_LINES) and takes the first suppression it meets. So a
390
+ * suppression applies to the first line below it that the compiler cannot
391
+ * step over:
392
+ *
393
+ * - where that is the line the code below starts on, the line is the
394
+ * suppression's `target`, which no removal may pull more code onto;
395
+ * - where a line in between stops the compiler first — one opening with a
396
+ * block comment, say — the suppression has no target for that compiler,
397
+ * and the line is `blocking`: deleting it would let the suppression reach
398
+ * the code instead;
399
+ * - where another suppression ends on a line in between, that one takes the
400
+ * diagnostics from below, and this one reaches nothing past it. The line
401
+ * is blocking while that suppression is being removed (`suppressions`
402
+ * tells, for a line, whether each suppression ending on it is).
403
+ *
404
+ * The two compilers can stop at different lines: a line holding only a
405
+ * vertical tab stops tsc 7, while tsc 6 searches on to the next line it
406
+ * cannot pass.
407
+ */
408
+ function tscReach(source, comment, lineOffsets, ranges, suppressions) {
409
+ // A suppression applies from the line below it on, so code sharing its line
410
+ // (`/* @ts-ignore */ foo();`) does not end the search.
411
+ const codeStart = codeStartAfter(source, lineOffsets[comment.endLine] ?? source.length, ranges);
412
+ if (codeStart >= source.length)
413
+ return { blocking: [], target: undefined };
414
+ const codeLine = lineIndexAt(lineOffsets, codeStart) + 1;
415
+ const blocking = [];
416
+ let target;
417
+ for (const passable of TSC_PASSABLE_LINES) {
418
+ let line = comment.endLine + 1;
419
+ for (; line < codeLine; line += 1) {
420
+ const removing = suppressions(line);
421
+ if (removing === undefined && passable.test(source.slice(lineOffsets[line - 1], lineOffsets[line])))
422
+ continue;
423
+ // A suppression that stays stops the compiler whatever is removed.
424
+ if (removing?.includes(false) !== true)
425
+ blocking.push(line);
426
+ break;
427
+ }
428
+ if (line === codeLine)
429
+ target = codeLine;
430
+ }
431
+ return { blocking, target };
432
+ }
433
+ /**
434
+ * The removals on the given line when one of them opens it (holds its first
435
+ * non-whitespace character), so that deleting them would change how the
436
+ * line starts. None when something that survives opens the line instead, or
437
+ * nothing on it is to be removed.
438
+ */
439
+ function lineOpeningGroup(source, line) {
440
+ let first = line.start;
441
+ while (first < line.end && isBlank(source[first]))
442
+ first += 1;
443
+ return line.units.some((unit) => unit.start <= first && first < unit.end) ? commentsOf(line.units) : [];
444
+ }
445
+ /**
446
+ * The removal units that would join the given line to another: they reach
447
+ * past one of its ends, with something other than whitespace beyond them on
448
+ * the line they run into. Deleting such a comment takes its line breaks
449
+ * along, so what stands beyond it can land on the line, or what stands on
450
+ * the line move off it, and a directive covering the line would cover other
451
+ * code — unless line breaks of its own take its place (see applyEdits).
452
+ */
453
+ function joiningUnits(source, line) {
454
+ return line.units.filter((unit) => (unit.end > line.end && !closesItsLine(source, unit)) || (unit.start < line.start && !opensItsLine(source, unit)));
455
+ }
456
+ // The next-line directives oxlint reads.
457
+ const OXLINT_NEXT_LINE = new Set(["eslint-disable-next-line", "oxlint-disable-next-line"]);
458
+ /**
459
+ * Whether the directive covers the lines it stands on: the `-line` forms of
460
+ * the suppressions (`eslint-disable-line`, `tslint:disable-line`, ...), the
461
+ * ones that cover the line holding them (see OWN_LINE_DIRECTIVES), and the
462
+ * `ignore next` hints c8 and monocart count lines for (see
463
+ * COUNTED_NEXT_LINE): they ignore the line holding one, from the hint on for
464
+ * monocart, along with the lines below it.
465
+ */
466
+ function coversOwnLine(name) {
467
+ return ((name.endsWith("-line") && !name.endsWith("-next-line")) ||
468
+ OWN_LINE_DIRECTIVES.has(name) ||
469
+ COUNTED_NEXT_LINE.has(name));
470
+ }
471
+ // Suppressions that apply to the line holding them: Semgrep's to findings
472
+ // that start on it, CodeQL's `lgtm` to its alerts up to the comment,
473
+ // DeepSource's, SonarQube's, gitleaks', TruffleHog's and detect-secrets' to
474
+ // the line, and codespell's to its words.
475
+ const OWN_LINE_DIRECTIVES = new Set([
476
+ "nosemgrep",
477
+ "lgtm",
478
+ "skipcq",
479
+ "NOSONAR",
480
+ "gitleaks:allow",
481
+ "trufflehog:ignore",
482
+ "pragma-allowlist-secret",
483
+ "codespell:ignore",
484
+ ]);
485
+ // Semgrep applies a `nosemgrep` to the line below where nothing but
486
+ // non-alphanumerics precede it on its line (`nosem_previous_line_re` in its
487
+ // Nosemgrep.ml): `// nosemgrep: rule-id` and `}); // nosemgrep` cover the next
488
+ // line, `// TODO nosemgrep` and `foo(); // nosemgrep` only their own.
489
+ const SEMGREP_PREVIOUS_LINE = /^[^a-zA-Z0-9]* *nosem(?:grep)?/i;
490
+ // A `nosemgrep` that names the rules it is for.
491
+ const SEMGREP_RULE_IDS = /nosem(?:grep)?[:=]/i;
492
+ // These suppressions only apply to the following node/line when they stand on
493
+ // their own line — trailing after code they target (at most) their own line.
494
+ // Other next-line directives (`@ts-ignore`, `no-dd-sa`, ...) target the next
495
+ // line even when they trail code.
496
+ const TRAILING_TARGETS_OWN_LINE = new Set([
497
+ "prettier-ignore",
498
+ "oxfmt-ignore",
499
+ "dprint-ignore",
500
+ "lgtm",
501
+ "codeql",
502
+ "skipcq",
503
+ ]);
504
+ // The suppressions tsc looks past blank and `//` lines for (see tscReach).
505
+ // They stay next-line directives as well: Flow, which honours them in
506
+ // TypeScript files, applies them to the very next line.
507
+ const TSC_SUPPRESSIONS = new Set(["@ts-ignore", "@ts-expect-error"]);
508
+ // The lines each compiler steps over on its way up from a diagnostic to a
509
+ // suppression, matched against the whole line, line break included. tsc 6
510
+ // trims the line and accepts nothing or a `//` comment; tsc 7 accepts only
511
+ // spaces and tabs before the line break or the `//`.
512
+ const TSC_PASSABLE_LINES = [/^\s*(?:\/\/|$)/, /^[ \t]*(?:[\r\n]|\/\/)/];
513
+ // Directives that only count while no other comment sits between them and
514
+ // their target: deno_graph reads `@deno-types`/`@ts-types` from the last
515
+ // comment before an import, ts-prune and graphql-tag-pluck from the closest
516
+ // leading comment, and ESLint's no-fallthrough and default-case from the last
517
+ // comment before the next case or the closing brace. JetBrains IDEs take a
518
+ // `noinspection` suppression from the comment right in front of a statement,
519
+ // past whitespace alone (`getStatementToolSuppressedIn` in the platform's
520
+ // SuppressionUtil), and a `language=` injection from the comment in front of
521
+ // the literal. Deleting every comment in that gap would newly activate such a
522
+ // directive, so the last one of them stays, trailing comments in front of
523
+ // the code included. With no code left there is nothing to target, and the
524
+ // switch-clause comments are only detected in front of the `case`, `default`
525
+ // or `}` their rules read them before.
526
+ const LAST_COMMENT_DIRECTIVES = new Set([
527
+ "@deno-types",
528
+ "@ts-types",
529
+ "ts-prune-ignore-next",
530
+ "GraphQL",
531
+ "fallthrough",
532
+ "no-default",
533
+ "noinspection",
534
+ "language-injection",
535
+ ]);
536
+ function isLastCommentDirective(comment, directive) {
537
+ // `//file:noinspection` suppresses for the whole file, wherever the code is.
538
+ return LAST_COMMENT_DIRECTIVES.has(directive) && !(directive === "noinspection" && /^\/\/file:/.test(comment.text));
539
+ }
540
+ // The JSDoc type casts prettier keeps the parentheses of (see the rule in
541
+ // directives.ts): it does while nothing but whitespace stands between the
542
+ // comment and the parenthesis (`text.slice(previousCommentEnd, start).trim()`
543
+ // in its parse/postprocess), under its Babel, acorn and meriyah parsers. A
544
+ // comment in between leaves the cast out of effect, and prettier drops
545
+ // redundant parentheses there, so the last comment of that gap stays.
546
+ const CAST_DIRECTIVES = new Set(["@type", "@satisfies"]);
547
+ // The coverage hints ast-v8-to-istanbul, Vitest's v8 provider, applies to the
548
+ // node that starts at the very token after them, where it reads them (see
549
+ // hintsNextNode): with another comment in between, the hint has no target,
550
+ // and deleting every comment there would bring it into effect. One comment of
551
+ // the gap up to the code stays, on top of the lines below the hint, which c8,
552
+ // Node and monocart count.
553
+ const NEXT_TOKEN_DIRECTIVES = new Set([
554
+ "istanbul-ignore-next",
555
+ "istanbul-ignore-if",
556
+ "istanbul-ignore-else",
557
+ "c8-ignore-next",
558
+ "c8-ignore-if",
559
+ "c8-ignore-else",
560
+ "v8-ignore-next",
561
+ "v8-ignore-if",
562
+ "v8-ignore-else",
563
+ "node:coverage-ignore",
564
+ "node:coverage-ignore-if",
565
+ "node:coverage-ignore-else",
566
+ ]);
567
+ // Directives that target the line or node directly below them. File- and
568
+ // range-scoped pragmas (`istanbul-ignore-file`, `c8-ignore-start`, ...) are
569
+ // absent: they do not target the following line, so they never shield it.
570
+ // They go by their names here: Vitest's v8 provider reads a range hint
571
+ // spelled out on any line of this file, and would drop the rest of the file
572
+ // from this project's coverage. So are the coverage hints no tool counts
573
+ // lines for — the `istanbul` ones and the `if` and `else` forms, which
574
+ // istanbul and ast-v8-to-istanbul alone read, and apply to a node wherever
575
+ // its line is (see NEXT_TOKEN_DIRECTIVES).
576
+ const NEXT_LINE_DIRECTIVES = new Set([
577
+ "@ts-ignore",
578
+ "@ts-expect-error",
579
+ "biome-ignore",
580
+ "deno-lint-ignore",
581
+ "deno-fmt-ignore",
582
+ "deno-coverage-ignore",
583
+ "prettier-ignore",
584
+ "oxfmt-ignore",
585
+ "dprint-ignore",
586
+ "rome-ignore",
587
+ "c8-ignore-next",
588
+ "v8-ignore-next",
589
+ "node:coverage-ignore",
590
+ // Directives that hang off the node or line directly below them: the line
591
+ // below stays a line, so that no code moves up under them.
592
+ "million-ignore",
593
+ "@million-skip",
594
+ "@million-jsx-skip",
595
+ "deepcode-ignore",
596
+ "skipcq",
597
+ "lgtm",
598
+ "codeql",
599
+ "nosemgrep",
600
+ "no-dd-sa",
601
+ "datadog-disable",
602
+ "@next-codemod-error",
603
+ "@next-codemod-ignore",
604
+ "$FlowFixMe",
605
+ "$FlowExpectedError",
606
+ "$FlowIssue",
607
+ "$FlowIgnore",
608
+ "pragma-allowlist-nextline-secret",
609
+ "cspell:disable-next",
610
+ "HTML",
611
+ ]);
612
+ function isNextLineDirective(name) {
613
+ return name.endsWith("-next-line") || NEXT_LINE_DIRECTIVES.has(name);
614
+ }
615
+ // The coverage pragmas a line count after `ignore next` applies to: c8
616
+ // (v8-to-istanbul), Node's test-runner coverage and monocart-coverage-reports
617
+ // count lines, each in its own way (see coverage.ts). istanbul and
618
+ // ast-v8-to-istanbul, Vitest's providers, apply the hint to the next node
619
+ // whatever count follows, so `istanbul ignore next 3` covers one line.
620
+ // Everything else — `@ts-expect-error`, `eslint-disable-next-line` and
621
+ // friends — covers exactly one line too, no matter what prose like "we
622
+ // ignore next 3 legacy calls" appears in the reason text.
623
+ const COUNTED_NEXT_LINE = new Set(["c8-ignore-next", "v8-ignore-next", "node:coverage-ignore"]);
624
+ //# sourceMappingURL=shields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shields.js","sourceRoot":"","sources":["../src/shields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAyC,MAAM,cAAc,CAAC;AACpG,OAAO,EAAE,UAAU,EAAE,YAAY,EAAoC,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACrH,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAc,MAAM,aAAa,CAAC;AA2DhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAc,EACd,OAAkB,EAClB,IAAe,EACf,OAAkB,EAClB,OAAsB;IAEtB,MAAM,WAAW,GAAG,gBAAgB,CAAC,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