aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters
diff options
context:
space:
mode:
authorFrederik Buchlák <30214087+fbuchlak@users.noreply.github.com>2023-11-12 03:20:03 +0100
committerGitHub <noreply@github.com>2023-11-11 18:20:03 -0800
commit5235405cc6d4ac98dc9008ffa850038e3325bbce (patch)
tree3b09827242176ac57a7886a72933946c16944f10 /lua/conform/formatters
parentcb633918c84054eebac7e3301de4c741ab760110 (diff)
feat: add phpinsights (#170)
* feat: add phpinsights * doc: remove redundant mention of formatting in description --------- Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
Diffstat (limited to 'lua/conform/formatters')
-rw-r--r--lua/conform/formatters/phpinsights.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/lua/conform/formatters/phpinsights.lua b/lua/conform/formatters/phpinsights.lua
new file mode 100644
index 0000000..c2575d1
--- /dev/null
+++ b/lua/conform/formatters/phpinsights.lua
@@ -0,0 +1,17 @@
+local util = require("conform.util")
+
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/nunomaduro/phpinsights",
+ description = "The perfect starting point to analyze the code quality of your PHP projects.",
+ },
+ command = util.find_executable({
+ "vendor/bin/phpinsights",
+ }, "phpinsights"),
+ args = { "fix", "$FILENAME", "--no-interaction", "--quiet" },
+ cwd = util.root_file({
+ "phpinsights.php",
+ }),
+ stdin = false,
+}