mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
88d196bae8
Most features have a desktop view and a phone view, and each carried its own copy of the feature's logic, so SonarCloud's duplication condition was the gate a pull request touching both failed most often, and only after a scan of twenty minutes. lint:dup finds the same copies before the push. It runs jscpd's detector (@jscpd/core with @jscpd/tokenizer) over the source files under src/ at the thresholds the SonarCloud gate applies to TypeScript, 100 tokens over at least 10 lines, and counts per file the lines inside a block that repeats elsewhere or in the same file. Tests and declaration files are left out as Sonar leaves them out, and .ts and .tsx are read as one language, so a hook that repeats a view's code is a copy too. The files are read sorted and with readText, so every machine counts the same. scripts/dup-baseline.json holds the files that still hold copies with their count; a file may hold no more than its entry, a file without an entry none, and an entry above its file or for a file that is gone fails until --update lowers it. --list prints every block with its other side. The engine packages are used instead of the jscpd command, which walks the tree in file system order, skips files past its size limits without a word and drops every result once it meets a file it has no format for.
38 lines
1.8 KiB
JSON
38 lines
1.8 KiB
JSON
{
|
|
"src/components/Admin/AddonManager.tsx": 23,
|
|
"src/components/Files/FileManagerMarkdownPreviewModal.tsx": 19,
|
|
"src/components/Files/FileManagerPdfPreviewModal.tsx": 19,
|
|
"src/components/Map/MapView.tsx": 56,
|
|
"src/components/Map/MapViewGL.tsx": 51,
|
|
"src/components/Map/ReservationOverlay.tsx": 75,
|
|
"src/components/Map/RouteCalculator.ts": 27,
|
|
"src/components/Map/reservationsMapbox.ts": 72,
|
|
"src/components/Packing/ApplyTemplateButton.tsx": 19,
|
|
"src/components/Packing/PackingListPanelHeader.tsx": 16,
|
|
"src/components/Planner/AddressInput.tsx": 38,
|
|
"src/components/Planner/AirportSelect.tsx": 44,
|
|
"src/components/Planner/DayPlanSidebar.tsx": 326,
|
|
"src/components/Planner/LocationSelect.tsx": 56,
|
|
"src/components/Planner/ReservationModal.tsx": 26,
|
|
"src/components/Planner/TransportModal.tsx": 26,
|
|
"src/components/Studio/StudioInspector.tsx": 19,
|
|
"src/components/Studio/StudioTravelInspector.tsx": 19,
|
|
"src/components/Studio/TravelElements.tsx": 10,
|
|
"src/components/Studio/roadRoute.ts": 17,
|
|
"src/components/shared/CustomTimePicker.tsx": 24,
|
|
"src/mobile/screens/admin/MAdminAddonManager.tsx": 23,
|
|
"src/mobile/screens/admin/MAdminStoragePanel.tsx": 38,
|
|
"src/mobile/screens/trip/sheets/MReservationSheet.tsx": 79,
|
|
"src/mobile/screens/trip/sheets/MTransportFormSheet.tsx": 139,
|
|
"src/mobile/screens/trip/tabs/MBookingsTab.tsx": 88,
|
|
"src/mobile/screens/trip/tabs/MTransportsTab.tsx": 90,
|
|
"src/mobile/screens/vacay/MVacayInviteSheet.tsx": 21,
|
|
"src/mobile/screens/vacay/MVacayShareSheet.tsx": 21,
|
|
"src/pages/TripPlannerPage.tsx": 82,
|
|
"src/pages/admin/GoogleOptions.tsx": 13,
|
|
"src/pages/admin/TrekApiCard.tsx": 14,
|
|
"src/pages/atlas/AtlasCountrySearch.tsx": 38,
|
|
"src/store/slices/budgetSlice.ts": 16,
|
|
"src/store/slices/remoteEventHandler.ts": 17
|
|
}
|