mirror of
https://github.com/morluto/rea.git
synced 2026-12-03 21:46:01 +00:00
refactor(ci): share duplication report clone-file schema (#16384)
This commit is contained in:
1 parent
d470cc88b6
commit
bfe132cc01
1 file changed
+13
-23
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user