From 67ee2258e08ccb91345d52f62484b657feccef25 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli <506791+stevearc@users.noreply.github.com> Date: Fri, 15 Mar 2024 08:57:34 -0700 Subject: fix(phpcbf): use non-stdin formatting and customize tempfile name (#333) prev-branch: stevearc-tmpfile-1 --- lua/conform/formatters/phpcbf.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lua/conform/formatters/phpcbf.lua') diff --git a/lua/conform/formatters/phpcbf.lua b/lua/conform/formatters/phpcbf.lua index 6c6027e..7f81b8b 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 -- cgit v1.2.3-70-g09d2