Skip to content

Commit

Permalink
Map issues through the Issue constructor
Browse files Browse the repository at this point in the history
The direct use of BidsIssue/BidsHedIssue was causing issues with
downstream tools. Converting them to plain Issue objects should
fix this problem.

Fixes #2142
  • Loading branch information
happy5214 committed Oct 1, 2024
1 parent b8c98ec commit 3d5b919
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bids-validator/validators/hed.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import utils from '../utils'

const Issue = utils.issues.Issue

export default async function checkHedStrings(tsvs, jsonContents, jsonFiles) {
export default async function returnHedIssues(tsvs, jsonContents, jsonFiles) {
const issues = await checkHedStrings(tsvs, jsonContents, jsonFiles)
return issues.map((issue) => new Issue(issue))
}

async function checkHedStrings(tsvs, jsonContents, jsonFiles) {
const datasetDescription = jsonContents['/dataset_description.json']
const datasetDescriptionData = new hedValidator.bids.BidsJsonFile(
'/dataset_description.json',
Expand Down

0 comments on commit 3d5b919

Please sign in to comment.