From 8b46758086e9e7531bcf8cfe29b9060b07c6c077 Mon Sep 17 00:00:00 2001 From: Zuruh Date: Wed, 24 Sep 2025 08:20:54 +0200 Subject: [PATCH] Add mago formatter recipe (#1811) * feat: add mago formatter default configuration * fix: remove patch version from version specifier * fix: Remove unsupported options for contrib recipes * fix: typo in post-install.txt * Added a comment about format config and enable linter symfony and phpunit plugins * Update to mago pre release * Update the docs link and add a note about the analyzer in the `post-install.txt` --- carthage-software/mago/1.0/mago.toml | 32 +++++++++++++++++++++ carthage-software/mago/1.0/manifest.json | 5 ++++ carthage-software/mago/1.0/post-install.txt | 10 +++++++ 3 files changed, 47 insertions(+) create mode 100644 carthage-software/mago/1.0/mago.toml create mode 100644 carthage-software/mago/1.0/manifest.json create mode 100644 carthage-software/mago/1.0/post-install.txt diff --git a/carthage-software/mago/1.0/mago.toml b/carthage-software/mago/1.0/mago.toml new file mode 100644 index 00000000..8373fb84 --- /dev/null +++ b/carthage-software/mago/1.0/mago.toml @@ -0,0 +1,32 @@ +php-version = "8.2" + +[source] +paths = [ + "src", + # "tests/", + # "importmap.php", + # "migrations/", +] +includes = ["vendor"] +excludes = [] + +[formatter] +print-width = 120 +tab-width = 4 +use-tabs = false + +[linter] +integrations = ["phpunit", "symfony"] + +[linter.rules] +ambiguous-function-call = { enabled = false } +literal-named-argument = { enabled = false } +halstead = { effort-threshold = 7000 } + +[analyzer] +find-unused-definitions = true +find-unused-expressions = false +analyze-dead-code = false +check-throws = true +allow-possibly-undefined-array-keys = true +perform-heuristic-checks = true diff --git a/carthage-software/mago/1.0/manifest.json b/carthage-software/mago/1.0/manifest.json new file mode 100644 index 00000000..d8aaf48d --- /dev/null +++ b/carthage-software/mago/1.0/manifest.json @@ -0,0 +1,5 @@ +{ + "copy-from-recipe": { + "mago.toml": "mago.toml" + } +} diff --git a/carthage-software/mago/1.0/post-install.txt b/carthage-software/mago/1.0/post-install.txt new file mode 100644 index 00000000..211c890d --- /dev/null +++ b/carthage-software/mago/1.0/post-install.txt @@ -0,0 +1,10 @@ + + What's next? + + + * Review your mago.toml file: + 1. Set your exact php_version + 2. Update your source.paths as needed; + 3. (Optional) Enable the linter and analyzer as well. + + * Read the full the documentation at https://mago.carthage.software/guide/getting-started