diff options
author | Frederik Buchlák <30214087+fbuchlak@users.noreply.github.com> | 2023-10-06 21:53:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-06 14:53:15 -0700 |
commit | e75819642c36810a55a7235b6b5e16a5ce896ed3 (patch) | |
tree | ec7c643ebf9ed46e4b8a38fe23435781e15f4c66 /lua/conform/formatters | |
parent | e5ed0635d9aa66c6c2f7eac3235e6a8eb2de0653 (diff) |
feat: add easy-coding-standard (#121)
* feat: add easy-coding-standard
* fix executable
Diffstat (limited to 'lua/conform/formatters')
-rw-r--r-- | lua/conform/formatters/easy-coding-standard.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lua/conform/formatters/easy-coding-standard.lua b/lua/conform/formatters/easy-coding-standard.lua new file mode 100644 index 0000000..d1ed3a6 --- /dev/null +++ b/lua/conform/formatters/easy-coding-standard.lua @@ -0,0 +1,18 @@ +local util = require("conform.util") + +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://github.com/easy-coding-standard/easy-coding-standard", + description = "ecs - Use Coding Standard with 0-knowledge of PHP-CS-Fixer and PHP_CodeSniffer.", + }, + command = util.find_executable({ + "vendor/bin/ecs", + }, "ecs"), + args = { "check", "$FILENAME", "--fix", "--no-interaction" }, + cwd = util.root_file({ + "ecs.php", + }), + require_cwd = true, + stdin = false, +} |