aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authornedia <aiden@nedia.dev>2023-09-27 16:42:29 +1300
committerGitHub <noreply@github.com>2023-09-26 20:42:29 -0700
commite691ecaf41139a68ccb79fde824cb534ca11abd2 (patch)
treeec6fc517b74e5b0d4901c75f153c5382505c1843 /lua
parent9e1fcd5cafc42b5dfbe2e942ddbece0dada4e1d0 (diff)
feat: Add support for php-cs-fixer (#78)
* feat(php-cs-fixer): Add support for php-cs-fixer * chore: Update README * fix(php-cs-fixer): Include meta * fix(php-cs-fixer): And include type annotation * fix(php-cs-fixer): Use find_executable instead of path_or
Diffstat (limited to 'lua')
-rw-r--r--lua/conform/formatters/php_cs_fixer.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/lua/conform/formatters/php_cs_fixer.lua b/lua/conform/formatters/php_cs_fixer.lua
new file mode 100644
index 0000000..e63ec42
--- /dev/null
+++ b/lua/conform/formatters/php_cs_fixer.lua
@@ -0,0 +1,15 @@
+local util = require("conform.util")
+
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer",
+ description = "The PHP Coding Standards Fixer.",
+ },
+ command = util.find_executable({
+ "tools/php-cs-fixer/vendor/bin/php-cs-fixer",
+ "vendor/bin/php-cs-fixer",
+ }, "php-cs-fixer"),
+ args = { "fix", "$FILENAME" },
+ stdin = false,
+}