Skip to content

Commit 4b2a854

Browse files
committed
feat: Always error on incorrect TSV types
1 parent 2d45432 commit 4b2a854

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

src/issues/list.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,6 @@ export const bidsIssues: IssueDefinitionRecord = {
123123
reason:
124124
'A value in a column did not match the acceptable type for that column headers specified format.',
125125
},
126-
TSV_VALUE_INCORRECT_TYPE_NONREQUIRED: {
127-
severity: 'warning',
128-
reason:
129-
'A value in a column did not match the acceptable type for that column headers specified format.',
130-
},
131126
TSV_COLUMN_TYPE_REDEFINED: {
132127
severity: 'warning',
133128
reason:

src/schema/tables.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Deno.test('tables eval* tests', async (t) => {
6969
const rule = schemaDefs.rules.tabular_data.modality_agnostic.Scans
7070
evalColumns(rule, context, schema, 'rules.tabular_data.modality_agnostic.Scans')
7171
assertEquals(
72-
context.dataset.issues.get({ code: 'TSV_VALUE_INCORRECT_TYPE_NONREQUIRED' }).length,
72+
context.dataset.issues.get({ code: 'TSV_VALUE_INCORRECT_TYPE' }).length,
7373
1,
7474
)
7575
})
@@ -159,7 +159,7 @@ Deno.test('tables eval* tests', async (t) => {
159159

160160
// Overriding the default sex definition uses the provided values
161161
// Values in the default definition may raise issues
162-
issues = context.dataset.issues.get({ code: 'TSV_VALUE_INCORRECT_TYPE_NONREQUIRED' })
162+
issues = context.dataset.issues.get({ code: 'TSV_VALUE_INCORRECT_TYPE' })
163163
assertEquals(issues.length, 1)
164164
assertEquals(issues[0].subCode, 'sex')
165165
assertEquals(issues[0].line, 4)

src/schema/tables.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ export function evalColumns(
251251
const spec = compileSignature(signature, schema.objects.formats)
252252

253253
const issue = {
254-
code: 'TSV_VALUE_INCORRECT_TYPE' + (requirement != 'required' ? '_NONREQUIRED' : ''),
254+
code: 'TSV_VALUE_INCORRECT_TYPE',
255255
subCode: name,
256256
location: context.path,
257257
rule: schemaPath,

0 commit comments

Comments
 (0)