You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the LSP spec, the line and character must both be unsigned
integers. The spec also specifically calls out that `-1` is not
supported: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position
With some code structures, it is possible to produce an error such as
the following from `golangci-lint run --out-format=json`:
```json
{
"FromLinter": "typecheck",
"Text": ": # github.com/my/package [github.com/my/package.test]\n./main.go:31:2: undefined: asdf",
"Severity": "",
"SourceLines": [
"package main"
],
"Replacement": null,
"Pos": {
"Filename": "main.go",
"Offset": 0,
"Line": 1,
"Column": 0
},
"ExpectNoLint": false,
"ExpectedNoLintLinter": ""
}
```
This ultimately does result in some issues with tooling compatibility,
for example: folke/trouble.nvim#224 (comment)
By preventing the number from dropping below zero, this class of error
should no longer be present.
0 commit comments