Skip to content

Commit a125905

Browse files
authored
fix(lint): handle linter output correctly (#192)
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.
1 parent 8f66373 commit a125905

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lua/guard/lint.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ function M.do_lint_single(buf, config)
6969
vim.log.levels.WARN
7070
)
7171
data = ''
72+
else
73+
data = out
7274
end
7375
else
7476
data = lint.fn(prev_lines)

0 commit comments

Comments
 (0)