Skip to content

Commit d2537f7

Browse files
committed
fix psalm
1 parent a25918e commit d2537f7

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

.github/workflows/static.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,9 @@ jobs:
5151
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
5252

5353
- name: Static analysis
54-
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle --php-version=${{ matrix.php }} | cs2pr --graceful-warnings --colorize
54+
if: matrix.php == '8.0'
55+
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle --php-version=${{ matrix.php }} --config=psalm-8.0.xml | cs2pr --graceful-warnings --colorize
56+
57+
- name: Static analysis
58+
if: matrix.php != '8.0'
59+
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle --php-version=${{ matrix.php }} --config=psalm.xml | cs2pr --graceful-warnings --colorize

psalm-8.0.xml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
errorLevel="1"
4+
findUnusedBaselineEntry="true"
5+
findUnusedCode="false"
6+
autoloader="vendor/codeception/codeception/autoload.php"
7+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8+
xmlns="https://getpsalm.org/schema/config"
9+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
10+
>
11+
<projectFiles>
12+
<directory name="src" />
13+
<ignoreFiles>
14+
<directory name="vendor" />
15+
</ignoreFiles>
16+
</projectFiles>
17+
</psalm>

psalm.xml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?xml version="1.0"?>
22
<psalm
33
errorLevel="1"
4+
findUnusedBaselineEntry="true"
5+
findUnusedCode="false"
46
autoloader="vendor/codeception/codeception/autoload.php"
57
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
68
xmlns="https://getpsalm.org/schema/config"
@@ -12,4 +14,7 @@
1214
<directory name="vendor" />
1315
</ignoreFiles>
1416
</projectFiles>
17+
<issueHandlers>
18+
<RiskyTruthyFalsyComparison errorLevel="suppress" />
19+
</issueHandlers>
1520
</psalm>

0 commit comments

Comments
 (0)