From 766812b0e830c2e40613f99f89102d8840431c6a Mon Sep 17 00:00:00 2001 From: Frederik Buchlák <30214087+fbuchlak@users.noreply.github.com> Date: Tue, 20 Feb 2024 17:47:11 +0000 Subject: feat: add twig-cs-fixer (#304) --- lua/conform/formatters/twig-cs-fixer.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lua/conform/formatters/twig-cs-fixer.lua (limited to 'lua/conform/formatters/twig-cs-fixer.lua') diff --git a/lua/conform/formatters/twig-cs-fixer.lua b/lua/conform/formatters/twig-cs-fixer.lua new file mode 100644 index 0000000..b248e6c --- /dev/null +++ b/lua/conform/formatters/twig-cs-fixer.lua @@ -0,0 +1,20 @@ +local util = require("conform.util") + +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://github.com/VincentLanglet/Twig-CS-Fixer", + description = "Automatically fix Twig Coding Standards issues", + }, + command = util.find_executable({ + "vendor/bin/twig-cs-fixer", + }, "twig-cs-fixer"), + args = { "lint", "$FILENAME", "--fix", "--no-interaction", "--quiet" }, + cwd = util.root_file({ + ".twig-cs-fixer.php", + ".twig-cs-fixer.dist.php", + "composer.json", + }), + require_cwd = false, + stdin = false, +} -- cgit v1.2.3-70-g09d2