From 42ac987e0eb1f0a4b03fdf3a8115540fc4ba6484 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Thu, 14 Mar 2024 16:55:26 -0700 Subject: [PATCH] fix(phpcbf): use non-stdin formatting and customize tempfile name prev-branch: stevearc-tmpfile-1 --- lua/conform/formatters/phpcbf.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/conform/formatters/phpcbf.lua b/lua/conform/formatters/phpcbf.lua index 6c6027ee..7f81b8b2 100644 --- a/lua/conform/formatters/phpcbf.lua +++ b/lua/conform/formatters/phpcbf.lua @@ -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