summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpseudometa <73286100+chrisgrieser@users.noreply.github.com>2023-09-22 17:56:35 +0200
committerGitHub <noreply@github.com>2023-09-22 08:56:35 -0700
commit5454fb5a72a957b550fb7a0f5c4e84684c529920 (patch)
tree60b61f1547de414c2e2abd14f52e7585847bb099
parent305eb13a38e6596a68fdea625afc46b2d9b320d5 (diff)
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`
-rw-r--r--lua/conform/formatters/markdownlint.lua1
-rw-r--r--lua/conform/formatters/stylelint.lua1
2 files changed, 2 insertions, 0 deletions
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,
}