aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters/twig-cs-fixer.lua
blob: b248e6cb23a5243aaf226c9e11585bb88f74c9b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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,
}