From db9da1aa57e8be683ada1b1e5f8129c28d2576eb Mon Sep 17 00:00:00 2001 From: pseudometa <73286100+chrisgrieser@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:46:40 +0100 Subject: fix: respect excluded-files-config from `typos.toml` (#219) --- lua/conform/formatters/typos.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lua/conform/formatters') diff --git a/lua/conform/formatters/typos.lua b/lua/conform/formatters/typos.lua index e6ae668..c571629 100644 --- a/lua/conform/formatters/typos.lua +++ b/lua/conform/formatters/typos.lua @@ -5,7 +5,13 @@ return { description = "Source code spell checker", }, command = "typos", - stdin = true, - args = { "--write-changes", "-" }, + -- cannot use stdin, as otherwise `typos` has no information on the filename, + -- making excluded-file-configs ineffective + stdin = false, + args = { + "--write-changes", + "--force-exclude", -- so excluded files in the config take effect + "$FILENAME", + }, exit_codes = { 0, 2 }, } -- cgit v1.2.3-70-g09d2