Skip to content

Commit 4f29c89

Browse files
committed
feat: Add --max-rows argument
1 parent fe9d3e4 commit 4f29c89

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/setup/options.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Deno.test('options parsing', async (t) => {
1010
json: true,
1111
color: false,
1212
blacklistModalities: [],
13+
maxRows: 1000,
1314
})
1415
})
1516
})

src/setup/options.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export type ValidatorOptions = {
3030
outfile?: string
3131
blacklistModalities: string[]
3232
prune?: boolean
33+
maxRows?: number
3334
}
3435

3536
const modalityType = new EnumType<string>(
@@ -50,6 +51,11 @@ export const validateCommand: Command<void, void, any, string[], void> = new Com
5051
'Specify a schema version to use for validation',
5152
)
5253
.option('-c, --config <file:string>', 'Path to a JSON configuration file')
54+
.option(
55+
'--max-rows <nrows:number>',
56+
'Maximum number of rows to validate in TSVs. Use 0 to validate headers only. Use -1 to validate all.',
57+
{ default: 1000 },
58+
)
5359
.option('-v, --verbose', 'Log more extensive information about issues')
5460
.option('--ignoreWarnings', 'Disregard non-critical issues')
5561
.option(

0 commit comments

Comments
 (0)