-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcpd.ini
More file actions
36 lines (34 loc) · 1.76 KB
/
Copy pathphpcpd.ini
File metadata and controls
36 lines (34 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
; phpcpd.ini — phpcpd-next, scanning itself.
;
; The project eats its own cooking, and doing so turned up the one thing a
; clone detector's own repository gets wrong: its test fixtures are files
; that exist in order to be duplicates. A bare scan reports two dozen of
; them, all correct and none actionable.
;
; The ignore markers are the wrong instrument for that. Suppression is
; applied inside the detector, so a `phpcpd-ignore-start` in a fixture
; removes the very clone the fixture was written to prove — measured, not
; assumed:
;
; UnifiedEngineTest::it_finds_the_duplication_in_the_clone_fixtures fails
; with "Failed asserting that 0 is greater than 0". A marker there would be
; a test suppressing itself.
;
; So the right notation is the one that says "not program text under
; review", which is an exclude, stated once for the project rather than
; retyped on every invocation.
; The same notation, for the same reason, applies to the locale files. A
; translation is a file whose structure is *required* to match every other
; translation's, key for key — that is what makes it a translation rather than
; a rewrite. Twenty-eight of them scan as one 279-line clone (hr against ro, the
; pair that happened to be adjacent), and the model already distrusts it: the
; finding scores -1.21, the most negative confidence this repository produces.
; It still reports as asserted, because the matched extent opens at
; `declare(strict_types=1)` — the licence header is identical too — and the
; table stratum requires a statement-free array-literal frame. Correct by its
; own definition, and the wrong instrument here either way: these files are not
; program text under review.
exclude[] = tests/fixtures
exclude[] = bench/corpus
exclude[] = bench/results
exclude[] = locale