tackbox 0.1.74 → 0.1.76
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 +20 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -302,7 +302,7 @@ rule id (parity with the pre-migration ids).
|
|
|
302
302
|
Full ids carry the `python-` prefix (e.g. `python-swallowed-exception`).
|
|
303
303
|
TBX009 is retired (the removed secret-name heuristic, D001), as JV008 is.
|
|
304
304
|
|
|
305
|
-
### Duplication (DUP001, DUP002)
|
|
305
|
+
### Duplication (DUP001, DUP002, DUP003)
|
|
306
306
|
|
|
307
307
|
The `tackbox-jscpd` engine wraps a copy/paste detector and runs by
|
|
308
308
|
default over Go, Python, Java, and the JS family (`.js`, `.jsx`, `.mjs`,
|
|
@@ -316,12 +316,31 @@ no wiring.
|
|
|
316
316
|
- **DUP002** flags a native `jscpd:ignore` marker. That channel would
|
|
317
317
|
bypass the gated suppression below, so its presence alone is a
|
|
318
318
|
finding; remove it.
|
|
319
|
+
- **DUP003** flags a `dup-ok` marker that became unnecessary because
|
|
320
|
+
its callable-header clone is filtered automatically. Remove the
|
|
321
|
+
marker and its matching approval together.
|
|
322
|
+
|
|
323
|
+
A pair repeated wholly inside two callable headers is filtered
|
|
324
|
+
automatically when both complete clone endpoints fit reliable syntax
|
|
325
|
+
boundaries. The header includes the callable syntax, parameters,
|
|
326
|
+
return/result clauses, and required separator or body opener, but no
|
|
327
|
+
body token. This is marker-free and silent in normal, machine,
|
|
328
|
+
CodeClimate, and hook output. If either endpoint crosses into a body,
|
|
329
|
+
has incomplete coordinates, or has no reliable callable boundary, the
|
|
330
|
+
pair remains an ordinary DUP001. Header expressions are not classified
|
|
331
|
+
by purity: defaults, parameter or return annotations, destructuring,
|
|
332
|
+
and computed names are part of the header boundary even when they can
|
|
333
|
+
execute code.
|
|
319
334
|
|
|
320
335
|
Suppress one clone with a standalone `// dup-ok: <reason>` comment
|
|
321
336
|
directly above the block - a `#` or a single-line `/* ... */` comment
|
|
322
337
|
works per language. The reason must be at least 10 characters (D009),
|
|
323
338
|
and a trailing comment after code does not count. `dup-ok` above one
|
|
324
339
|
end drops only that end; above both ends it drops the whole clone.
|
|
340
|
+
Use it only for justified clones that survive automatic header
|
|
341
|
+
filtering. A matching approval confirms that a marker is authorized;
|
|
342
|
+
it does not make a redundant marker valid, so DUP003 remains until
|
|
343
|
+
both source marker and approval are removed.
|
|
325
344
|
|
|
326
345
|
Duplication is cross-file, so the engine is never cached: it runs on
|
|
327
346
|
every lint and writes no clean-cache markers. A `java`-format clone that
|
package/package.json
CHANGED