mirror of
https://gh.wpcy.net/https://github.com/aspirepress/AspireCloud.git
synced 2026-05-31 00:04:27 +08:00
163 lines
5 KiB
TOML
163 lines
5 KiB
TOML
# Welcome to Mago!
|
|
# For full documentation, see https://mago.carthage.software/tools/overview
|
|
php-version = "8.3.0"
|
|
|
|
[source]
|
|
paths = ["app/", "database/factories/", "database/seeders/", "tests/"]
|
|
includes = ["vendor"]
|
|
excludes = []
|
|
|
|
[formatter]
|
|
inline-empty-function-braces = true
|
|
inline-empty-classlike-braces = true
|
|
preserve-breaking-member-access-chain = true
|
|
preserve-breaking-argument-list = true
|
|
preserve-breaking-array-like = true
|
|
preserve-breaking-parameter-list = true
|
|
preserve-breaking-attribute-list = true
|
|
preserve-breaking-conditional-expression = true
|
|
break-promoted-properties-list = true
|
|
always-break-named-arguments-list = false
|
|
|
|
[linter]
|
|
integrations = ["symfony", "laravel"]
|
|
|
|
[linter.rules]
|
|
# Disable all rules currently firing by default
|
|
# vendor/bin/mago lint --reporting-format=emacs | perl -nE 'say qq[$1 = { enabled = false }] if / - (.*?):/' | sort | uniq | pbcopy
|
|
|
|
assert-description = { enabled = false }
|
|
braced-string-interpolation = { enabled = false }
|
|
class-name = { enabled = false }
|
|
constant-name = { enabled = false }
|
|
constant-type = { enabled = false }
|
|
cyclomatic-complexity = { enabled = false }
|
|
excessive-parameter-list = { enabled = false }
|
|
final-controller = { enabled = false }
|
|
function-name = { enabled = false }
|
|
halstead = { enabled = false }
|
|
interface-name = { enabled = false }
|
|
literal-named-argument = { enabled = false }
|
|
no-assign-in-condition = { enabled = false }
|
|
no-boolean-flag-parameter = { enabled = false }
|
|
no-boolean-literal-comparison = { enabled = false }
|
|
no-else-clause = { enabled = false }
|
|
no-empty = { enabled = false }
|
|
no-empty-comment = { enabled = false }
|
|
no-literal-password = { enabled = false }
|
|
no-request-all = { enabled = false }
|
|
no-shorthand-ternary = { enabled = false }
|
|
parameter-type = { enabled = false }
|
|
prefer-arrow-function = { enabled = false }
|
|
prefer-first-class-callable = { enabled = false }
|
|
property-type = { enabled = false }
|
|
return-type = { enabled = false }
|
|
strict-behavior = { enabled = false }
|
|
tagged-fixme = { enabled = false }
|
|
tagged-todo = { enabled = false }
|
|
too-many-methods = { enabled = false }
|
|
trait-name = { enabled = false }
|
|
|
|
[analyzer]
|
|
# Enable all features and categories, then disable every rule by default
|
|
allow-possibly-undefined-array-keys = false
|
|
analyze-dead-code = true
|
|
check-throws = true
|
|
find-unused-definitions = true
|
|
find-unused-expressions = true
|
|
memoize-properties = true
|
|
perform-heuristic-checks = true
|
|
|
|
# Issue categories
|
|
ambiguity-issues = true
|
|
argument-issues = true
|
|
array-issues = true
|
|
deprecation-issues = true
|
|
existence-issues = true
|
|
falsable-issues = true
|
|
generator-issues = true
|
|
impossibility-issues = true
|
|
iterator-issues = true
|
|
method-issues = true
|
|
mixed-issues = true
|
|
nullable-issues = true
|
|
operand-issues = true
|
|
property-issues = true
|
|
redundancy-issues = true
|
|
reference-issues = true
|
|
return-issues = true
|
|
template-issues = true
|
|
unreachable-issues = true
|
|
|
|
# There's no easy way to get a list of all rules mago knows about, so we'll just disable all errors we come across.
|
|
# vendor/bin/mago analyze --reporting-format=emacs | perl -nE 'say qq{"$1",} if / - (.*?):/' | sort | uniq
|
|
ignore = [
|
|
"ambiguous-object-property-access",
|
|
"array-to-string-conversion",
|
|
"impossible-assignment",
|
|
"impossible-condition",
|
|
"incompatible-property-type",
|
|
"invalid-argument",
|
|
"invalid-array-element-key",
|
|
"invalid-array-index",
|
|
"invalid-callable",
|
|
"invalid-destructuring-source",
|
|
"invalid-iterator",
|
|
"invalid-method-access",
|
|
"invalid-named-argument",
|
|
"invalid-operand",
|
|
"invalid-override-attribute",
|
|
"invalid-parent-type",
|
|
"invalid-property-access",
|
|
"invalid-return-statement",
|
|
"invalid-type-cast",
|
|
"less-specific-argument",
|
|
"less-specific-nested-argument-type",
|
|
"less-specific-nested-return-statement",
|
|
"less-specific-return-statement",
|
|
"match-not-exhaustive",
|
|
"method-access-on-null",
|
|
"mismatched-array-index",
|
|
"missing-override-attribute",
|
|
"mixed-argument",
|
|
"mixed-array-access",
|
|
"mixed-array-assignment",
|
|
"mixed-array-index",
|
|
"mixed-assignment",
|
|
"mixed-method-access",
|
|
"mixed-operand",
|
|
"mixed-property-access",
|
|
"mixed-return-statement",
|
|
"no-value",
|
|
"non-existent-method",
|
|
"non-existent-property",
|
|
"null-argument",
|
|
"null-array-index",
|
|
"null-operand",
|
|
"null-property-access",
|
|
"nullable-return-statement",
|
|
"possibly-invalid-argument",
|
|
"possibly-null-argument",
|
|
"possibly-null-array-access",
|
|
"possibly-null-array-index",
|
|
"possibly-null-operand",
|
|
"possibly-null-property-access",
|
|
"possibly-undefined-array-index",
|
|
"possibly-undefined-string-array-index",
|
|
"redundant-comparison",
|
|
"redundant-condition",
|
|
"redundant-logical-operation",
|
|
"redundant-null-coalesce",
|
|
"redundant-type-comparison",
|
|
"reference-to-undefined-variable",
|
|
"template-constraint-violation",
|
|
"too-many-arguments",
|
|
"undefined-string-array-index",
|
|
"undefined-variable",
|
|
"unhandled-thrown-type",
|
|
"unknown-match-subject-type",
|
|
"unused-parameter",
|
|
"unused-statement",
|
|
]
|
|
|
|
|