Skip to content

Commit

Permalink
fix(lint): handle linter output correctly (#192)
Browse files Browse the repository at this point in the history
Ensure that the linter output is correctly assigned to the `data`
variable when the output is not an error. This fixes a potential issue
where the `data` variable could be left empty even when the linter
produces valid output.
  • Loading branch information
yingmanwumen authored Jan 19, 2025
1 parent 8f66373 commit a125905
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/guard/lint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ function M.do_lint_single(buf, config)
vim.log.levels.WARN
)
data = ''
else
data = out
end
else
data = lint.fn(prev_lines)
Expand Down

0 comments on commit a125905

Please sign in to comment.