Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

Commit

Permalink
fix(builtins): add vim.NIL check to golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose Alvarez committed Nov 14, 2021
1 parent 81bdb29 commit ba8dfd9
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lua/null-ls/builtins/diagnostics/golangci_lint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ return h.make_builtin({
end,
on_output = function(params)
local diags = {}
for _, d in ipairs(params.output.Issues) do
if d.Pos.Filename == params.bufname then
table.insert(diags, {
row = d.Pos.Line,
col = d.Pos.Column,
message = d.Text,
})
local issues = params.output["Issues"]
if type(issues) == "table" then
for _, d in ipairs(issues) do
if d.Pos.Filename == params.bufname then
table.insert(diags, {
row = d.Pos.Line,
col = d.Pos.Column,
message = d.Text,
})
end
end
end
return diags
Expand Down

0 comments on commit ba8dfd9

Please sign in to comment.