Skip to content

Commit 850fce5

Browse files
committed
chore: add mago lint and analysis baselines
Signed-off-by: Joey Smith <jsmith@webinertia.net>
1 parent 040ed31 commit 850fce5

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

‎analysis-baseline.toml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
variant = "loose"
2+
3+
[[issues]]
4+
file = "src/Options.php"
5+
code = "match-arm-always-true"
6+
message = "This match arm is always true, making subsequent arms unreachable."
7+
count = 1
8+
9+
[[issues]]
10+
file = "src/Options.php"
11+
code = "redundant-logical-operation"
12+
message = "Redundant `&&` operation: left operand is always truthy and right operand is evaluated."
13+
count = 1
14+
15+
[[issues]]
16+
file = "src/Options.php"
17+
code = "redundant-logical-operation"
18+
message = "Redundant `&&` operation: left operand is evaluated and right operand is always truthy."
19+
count = 1
20+
21+
[[issues]]
22+
file = "src/Options.php"
23+
code = "redundant-null-coalesce"
24+
message = "Redundant null coalesce: left-hand side can never be `null` or undefined."
25+
count = 2
26+
27+
[[issues]]
28+
file = "src/Options.php"
29+
code = "unreachable-match-default-arm"
30+
message = "This default arm is unreachable."
31+
count = 1

‎lint-baseline.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
variant = "loose"
2+
issues = []

‎mago.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ align-assignment-like = true
3232
sort-class-methods = true
3333

3434
[linter]
35+
baseline = "lint-baseline.toml"
3536
minimum-fail-level = "Help"
3637
integrations = ["laminas", "phpunit"]
3738

@@ -95,6 +96,7 @@ switch-continue-to-break = { enabled = true }
9596
invalid-open-tag = { level = "Help" }
9697

9798
[analyzer]
99+
baseline = "analysis-baseline.toml"
98100
excludes = ["test"]
99101
plugins = ["psl", "psr-container"]
100102
find-unused-definitions = true

0 commit comments

Comments
 (0)