From 8839bf0c7855445697a6e2f8d47e0f7285a81f50 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Wed, 11 Feb 2026 18:54:48 +0100 Subject: [PATCH] feat(linter): add ignore_exit option --- lua/linter.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/linter.lua b/lua/linter.lua index 6cdd319..78f2d36 100644 --- a/lua/linter.lua +++ b/lua/linter.lua @@ -62,6 +62,8 @@ local util = require("util") ---@field zero_idx_col? boolean --- Don't log stderr as errors (default: false) ---@field ignore_stderr? boolean +--- Don't check exit status (default: false) +---@field ignore_exit? boolean --- Post-process diagnostics ---@field hook? fun(self: ow.lsp.Linter, diagnostics: vim.Diagnostic[]) @@ -290,6 +292,7 @@ function Linter.validate(config) zero_idx_lnum = { config.zero_idx_lnum, "boolean", true }, zero_idx_col = { config.zero_idx_col, "boolean", true }, ignore_stderr = { config.ignore_stderr, "boolean", true }, + ignore_exit = { config.ignore_exit, "boolean", true }, }) end @@ -400,7 +403,7 @@ function Linter:run() end) ) - if not ok then + if not self.config.ignore_exit and not ok then log.error("Failed to run %s: %s", self.config.cmd[1], resp) success = false end