Open happy5214 opened 4 days ago
The tests have improperly nested HED data in three sidecars (the HED level is the third level, where it should be the second level). This is causing https://github.com/hed-standard/hed-javascript/blob/916236a58b9912cb4fefc0e79aa9c28d0f35cedb/bids/types/json.js#L107 to (correctly) throw an IssueError for what amounts to a SIDECAR_INVALID HED error. However, the try block starting at https://github.com/bids-standard/bids-validator/blob/5646d9dee39eb9228881ec7e57887021cf3072b0/bids-validator/validators/hed.js#L34 incorrectly assumes all caught errors are missing schema errors, leading to improper issue reporting.
HED
IssueError
SIDECAR_INVALID
try
The tests need to be fixed to correct the level of HED in the three bad test sidecars, and hed.js needs to be re-coded to find another way to deal with a null return from the validation function.
hed.js
null
Originally posted by @happy5214 in https://github.com/bids-standard/bids-validator/issues/2167#issuecomment-2432545093
Please assign this to me. I plan to work on this in the next day or two.
The tests have improperly nested HED data in three sidecars (the
HED
level is the third level, where it should be the second level). This is causing https://github.com/hed-standard/hed-javascript/blob/916236a58b9912cb4fefc0e79aa9c28d0f35cedb/bids/types/json.js#L107 to (correctly) throw anIssueError
for what amounts to aSIDECAR_INVALID
HED error. However, thetry
block starting at https://github.com/bids-standard/bids-validator/blob/5646d9dee39eb9228881ec7e57887021cf3072b0/bids-validator/validators/hed.js#L34 incorrectly assumes all caught errors are missing schema errors, leading to improper issue reporting.The tests need to be fixed to correct the level of
HED
in the three bad test sidecars, andhed.js
needs to be re-coded to find another way to deal with anull
return from the validation function.Originally posted by @happy5214 in https://github.com/bids-standard/bids-validator/issues/2167#issuecomment-2432545093