Skip to content

Commit a2443cb

Browse files
committed
feat(inheritance): Improve error definition for MULTIPLE_INHERITABLE_FILES
1 parent c52a671 commit a2443cb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bids-validator/src/files/inheritance.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ export function* walkBack(
3333
exactMatch.viewed = true
3434
yield exactMatch
3535
} else {
36+
const paths = candidates.map((x) => x.path).sort()
3637
throw {
3738
code: 'MULTIPLE_INHERITABLE_FILES',
38-
location: source.path,
39-
affects: candidates.map((file) => file.path),
39+
location: paths[0],
40+
affects: source.path,
41+
issueMessage: `Candidate files: ${paths}`,
4042
}
4143
}
4244
} else if (candidates.length === 1) {

0 commit comments

Comments
 (0)