From 6d8685c7436efc0f70efb8858ae4cd07ffe1316d Mon Sep 17 00:00:00 2001 From: Saif Eddin Gmati <29315886+azjezz@users.noreply.github.com> Date: Thu, 23 Jan 2025 01:11:47 +0000 Subject: [PATCH] chore: update mago configuration to match latest release (#503) Signed-off-by: azjezz --- .gitignore | 3 +++ mago.toml | 36 ++++++++++++++++++++++++++++++++---- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ae925399..fc6cce36 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ # phpunit cache /config/.phpunit.result.cache + +# mago binary +mago diff --git a/mago.toml b/mago.toml index 626f244f..9986bb06 100644 --- a/mago.toml +++ b/mago.toml @@ -1,15 +1,43 @@ [source] paths = ["src", "tests", "examples"] includes = ["vendor"] -excludes = [] +excludes = [ + "src/bootstrap.php", + "src/preload.php", + "src/Psl/Internal/Loader.php", +] [format] null_type_hint = "pipe" [linter] -level = "Error" -default_plugins = true -plugins = ["phpunit"] +plugins = ["php-unit"] + +[[linter.rules]] +name = "maintainability/cyclomatic-complexity" +threshold = 43 + +[[linter.rules]] +name = "maintainability/kan-defect" +threshold = 3.5 + +[[linter.rules]] +name = "maintainability/halstead" +effort_threshold = 16_000.0 +volume_threshold = 1_400.0 +difficulty_threshold = 18.5 + +[[linter.rules]] +name = "maintainability/excessive-parameter-list" +threshold = 9 + +[[linter.rules]] +name = "maintainability/too-many-enum-cases" +threshold = 800 + +[[linter.rules]] +name = "maintainability/too-many-methods" +threshold = 43 [[linter.rules]] name = "best-practices/disallowed-functions"