diff --git a/scripts/ci/static-check-report.mjs b/scripts/ci/static-check-report.mjs index 1a1400d646f..96f0a67213f 100644 --- a/scripts/ci/static-check-report.mjs +++ b/scripts/ci/static-check-report.mjs @@ -26,29 +26,19 @@ const lintReport = z.object({ }), ), }); -const duplicateReport = z - .object({ - duplicates: z.array( - z - .object({ - firstFile: z.object({ name: z.string() }).passthrough(), - secondFile: z.object({ name: z.string() }).passthrough(), - }) - .passthrough(), - ), - statistics: z - .object({ - total: z - .object({ - sources: z.number(), - clones: z.number(), - percentage: z.number(), - }) - .passthrough(), - }) - .passthrough(), - }) - .passthrough(); +const cloneFile = z.looseObject({ name: z.string() }); +const duplicateReport = z.looseObject({ + duplicates: z.array( + z.looseObject({ firstFile: cloneFile, secondFile: cloneFile }), + ), + statistics: z.looseObject({ + total: z.looseObject({ + sources: z.number(), + clones: z.number(), + percentage: z.number(), + }), + }), +}); const run = ( packageName,