Skip to content

How to specify error location #1663

Answered by P0lip
gk12277 asked this question in Q&A
Jun 9, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hey!
I'm afraid you cannot do that.
Spectral outputs the range of values that are invalid, and there's no way to point it at a particular line specifically, as it'll always refer to the invalid value.
In your case, the error is actually not shown for all lines, but it's the value of foo property that's highlighted.
Note how that red-ish ~ starts right after : and not at the beginning.

I have a feeling the VS Code extension could be slightly adjusted to provide such a possibility, but there's not much you can do from the Spectral point of view.
It appears to me that it uses the aforementioned ranges which lead to the behavior you experience.
If it ignored the end boundary of the range, we'…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gk12277
Comment options

Answer selected by gk12277
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants