golangci-lint-langserver icon indicating copy to clipboard operation
golangci-lint-langserver copied to clipboard

Linting error doesn't update when coding

Open klesh opened this issue 3 years ago • 2 comments

Using nvim-lspconfig configuration on nvim 0.7.2 with golang 1.19

When renaming variables, the linting error doesn't seem to update, unless I reload the file: image

klesh avatar Sep 23 '22 07:09 klesh

saw sth in the debugging log, not sure if it was related:

[ERROR][2022-09-24 09:45:02] .../vim/lsp/rpc.lua:420	"rpc"	"golangci-lint-langserver"	"stderr"	"unexpected end of JSON input\n"
[ERROR][2022-09-24 09:45:51] .../vim/lsp/rpc.lua:420	"rpc"	"golangci-lint-langserver"	"stderr"	'2022/09/24 09:45:51 jsonrpc2 handler: notification "exit" handling error: jsonrpc2: code -32601 message: method not supported: exit\n'

I would try to fix the problem if someone could point me a direction :smile:

klesh avatar Sep 24 '22 02:09 klesh

after some digging, I managed to pinpoint the offending error: image which decoded to the follow error message by base64 -d:

level=warning msg="[runner] Can't run linter goanalysis_metalinter: goheader: open .golangci-goheader.template: no such file or directory"
level=error msg="Running error: 1 error occurred:\n\t* can't run linter goanalysis_metalinter: goheader: open .golangci-goheader.template: no such file or directory\n\n"

klesh avatar Sep 24 '22 05:09 klesh