-
Notifications
You must be signed in to change notification settings - Fork 22
Lint errors make it difficult to see code #83
Comments
|
Thanks! I'll use your advice for now. Yeah I was a little confused as to why the red underlines suddenly disappeared. Sometimes the error would be shown in the list of errors at the bottom of the screen but clicking on it didn't do anything. This is probably because like you said, the linter can no longer verify the validity of the spans |
As an FYI: Linter itself has a command to toggle the active editor, a simple way to disable linting temporarily on the file. |
@Arcanemagus does Linter provide a way to highlight several spans per error? Errors in Rust are sometimes somewhat complex, one way to do this would be using trace messages of a linter message. On a related note, I noticed that a Message v2 of Linter can no longer contain several trace messages (it now can contain only one reference point)'". Was it intended? |
Messages can only have a single Range associated with them. Trace(s) would be the best way to solve that currently. Only one Trace was ever being used from what we saw, but I'm not sure why the ability to have multiple was removed. The API isn't completely finalized yet as it hasn't been released so @steelbrain might be persuaded to add that capability back in. |
Hi @White-Oak, The reason behind removing several traces and adding only one description property is that it uses MarkDown and gives provider control over the appearance like never before, you can spread information in a format of your choice while also pulling docs from the web with http and make them all clickable (click to open url or click to open file). |
Same issue, while implementing a trait I've compiled to check one function and now i have a box covering my code everytime i try to implement the other functions of the trait... I know its incomplete and it wont if linter lets me finish. putting that on the first line would be enough. |
This is a screenshot of a function I'm in the middle of writing.
Here's the actual code in question:
I'm not done writing the function yet, so there are a number of problems with it. The error being shown is complaining that not every return path results in the expected return type. This is a valid complaint, but because the error takes over the entire function and the bubble is impossible to dismiss, it's really difficult to write code.
Would it be possible to make the bubble dismissable somehow? Like just hit esc or something and tell it to leave me alone. Also, instead of highlighting every line in the function, could you just highlight one part and tell me the error?
For this specific error for example, you could just highlight the return type or the function name and complain that I'm not returning the same type in every control path. This is what a lot of linters like ESLint do.
The text was updated successfully, but these errors were encountered: