From 5454fb5a72a957b550fb7a0f5c4e84684c529920 Mon Sep 17 00:00:00 2001 From: pseudometa <73286100+chrisgrieser@users.noreply.github.com> Date: Fri, 22 Sep 2023 17:56:35 +0200 Subject: fix: `stylelint` and `markdownlint` when there are non-autofixable errors (#70) * fix: `stylelint` when there are non-autofixable errors * fix: exit code for non-autofixable error in `markdownlint` --- lua/conform/formatters/markdownlint.lua | 1 + lua/conform/formatters/stylelint.lua | 1 + 2 files changed, 2 insertions(+) (limited to 'lua') diff --git a/lua/conform/formatters/markdownlint.lua b/lua/conform/formatters/markdownlint.lua index 654a603..40de29b 100644 --- a/lua/conform/formatters/markdownlint.lua +++ b/lua/conform/formatters/markdownlint.lua @@ -6,5 +6,6 @@ return { }, command = "markdownlint", args = { "--fix", "$FILENAME" }, + exit_codes = { 0, 1 }, -- code 1 is given when trying a file that includes non-autofixable errors stdin = false, } diff --git a/lua/conform/formatters/stylelint.lua b/lua/conform/formatters/stylelint.lua index 3d8361d..e102d84 100644 --- a/lua/conform/formatters/stylelint.lua +++ b/lua/conform/formatters/stylelint.lua @@ -6,5 +6,6 @@ return { }, command = "stylelint", args = { "--stdin", "--fix" }, + exit_codes = { 0, 2 }, -- code 2 is given when trying file includees some non-autofixable errors stdin = true, } -- cgit v1.2.3-70-g09d2