Skip to content

Commit

Permalink
fix(phpcbf): use non-stdin formatting and customize tempfile name (#333)
Browse files Browse the repository at this point in the history
prev-branch: stevearc-tmpfile-1
  • Loading branch information
stevearc committed Mar 15, 2024
1 parent b059626 commit 67ee225
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/conform/formatters/phpcbf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ return {
command = util.find_executable({
"vendor/bin/phpcbf",
}, "phpcbf"),
args = function(self, ctx)
return { "-q", "--stdin-path=" .. ctx.filename, "-" }
end,
stdin = true,
args = { "$FILENAME" },
stdin = false,
-- phpcbf ignores hidden files, so we have to override the default here
tmpfile_format = "conform.$RANDOM.$FILENAME",
-- 0: no errors found
-- 1: errors found
-- 2: fixable errors found
Expand Down

0 comments on commit 67ee225

Please sign in to comment.