Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update mago configuration to match latest release #503

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@

# phpunit cache
/config/.phpunit.result.cache

# mago binary
mago
36 changes: 32 additions & 4 deletions mago.toml
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +16 to +40
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything here is configured to ensure Psl code as is right now passes, there is a lot of places where it would make sense to lower complexity, but i don't think its worth doing right now.


[[linter.rules]]
name = "best-practices/disallowed-functions"
Expand Down
Loading