Skip to content

Commit 089f070

Browse files
authored
Merge pull request #621 from stoplightio/fix/correct-source
fix: use correct error source
2 parents 7f7c346 + 703ce6d commit 089f070

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ const createSpectralAnnotations = (ruleset: string, parsed: FileWithContent[], b
6868
message: vl.message,
6969
title: String(vl.code),
7070
start_line: 1 + vl.range.start.line,
71-
end_line: 1 + vl.range.end.line,
71+
end_line: 1 + vl.range.start.line,
7272
start_column: sameLine ? vl.range.start.character : undefined,
7373
end_column: sameLine ? vl.range.end.character : undefined,
74-
path: path.relative(basePath, validationResult.path),
74+
path: path.relative(basePath, vl.source || validationResult.path),
7575
};
7676
});
7777
})

0 commit comments

Comments
 (0)