From 595024eca1f31a3156b50015f69d8a7981765cb7 Mon Sep 17 00:00:00 2001 From: azjezz Date: Mon, 20 Jan 2025 06:52:37 +0100 Subject: [PATCH 1/2] chore: update mago configuration Signed-off-by: azjezz --- mago.toml | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) 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" From 8c7306ded37c2370bde10c3d810bb333eed16c13 Mon Sep 17 00:00:00 2001 From: azjezz Date: Mon, 20 Jan 2025 06:53:08 +0100 Subject: [PATCH 2/2] chore: ignore mago binary installed in root Signed-off-by: azjezz --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) 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