Skip to content

Commit

Permalink
fix: respect excluded-files-config from typos.toml (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Nov 27, 2023
1 parent cbc510c commit db9da1a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lua/conform/formatters/typos.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
}

0 comments on commit db9da1a

Please sign in to comment.