Skip to content

Commit

Permalink
feat(inheritance): Improve error definition for MULTIPLE_INHERITABLE_…
Browse files Browse the repository at this point in the history
…FILES
  • Loading branch information
effigies committed Oct 10, 2024
1 parent c52a671 commit 8fe0cc7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bids-validator/src/files/inheritance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ export function* walkBack(
exactMatch.viewed = true
yield exactMatch
} else {
// Sort candidates (in-place) and take first as the "location" of the problem
const location = candidates.sort()[0]
throw {
code: 'MULTIPLE_INHERITABLE_FILES',
location: source.path,
affects: candidates.map((file) => file.path),
location,
affects: source.path,
issueMessage: `Candidate files: ${candidates}`,
}
}
} else if (candidates.length === 1) {
Expand Down

0 comments on commit 8fe0cc7

Please sign in to comment.