Diagnostic code string is not always the code part of the diagnostic
Closed this issue · 2 comments
arnevm123 commented
When using different a different setup for a linter (nvim-lint for golangcilint in my case) it is possible that the code of the diagnostic is not always the code
part, but comes from the source
part
amadanmath commented
I ended up implementing it a little differently, but I believe this should now work, with
go = { 'prevline', '// nolint: ', code = 'source' },
or, equivalently,
go = {
'prevline',
'// nolint: ',
code = function(diag)
return diag.source
end
},
arnevm123 commented
Oh, letting it accept a function is way better!
Also the named options is better, thanks!