Skip to content

Commit 1b60f2f

Browse files
Create Psalm baseline
1 parent c243095 commit 1b60f2f

File tree

4 files changed

+48
-2
lines changed

4 files changed

+48
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: "php7.3 ./tools/composer update --no-ansi --no-interaction --no-progress --no-suggest"
3636

3737
- name: "Run vimeo/psalm"
38-
run: "php7.3 ./tools/psalm --config=psalm.xml --no-progress --shepherd --show-info=false --stats"
38+
run: "php7.3 ./tools/psalm --config=.psalm/config.xml --no-progress --shepherd --show-info=false --stats"
3939

4040
tests:
4141
name: "Tests"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
/.php_cs
33
/.php_cs.cache
44
/.phpunit.result.cache
5+
/.psalm/cache
56
/composer.lock
67
/vendor

.psalm/baseline.xml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<files psalm-version="3.8.3@389af1bfc739bfdff3f9e3dc7bd6499aee51a831">
3+
<file src="src/Output/StrictUnifiedDiffOutputBuilder.php">
4+
<InvalidOperand occurrences="9">
5+
<code>$hunkCapture</code>
6+
<code>$hunkCapture</code>
7+
<code>$i</code>
8+
<code>$contextStartOffset</code>
9+
<code>$contextStartOffset</code>
10+
<code>$contextStartOffset</code>
11+
<code>$contextStartOffset</code>
12+
<code>$hunkCapture</code>
13+
<code>$hunkCapture</code>
14+
</InvalidOperand>
15+
<PossiblyUndefinedVariable occurrences="1">
16+
<code>$i</code>
17+
</PossiblyUndefinedVariable>
18+
<TypeDoesNotContainType occurrences="2">
19+
<code>\is_string($options[$option])</code>
20+
<code>null !== $options[$option] &amp;&amp; !\is_string($options[$option])</code>
21+
</TypeDoesNotContainType>
22+
</file>
23+
<file src="src/Output/UnifiedDiffOutputBuilder.php">
24+
<InvalidOperand occurrences="9">
25+
<code>$hunkCapture</code>
26+
<code>$hunkCapture</code>
27+
<code>$i</code>
28+
<code>$contextStartOffset</code>
29+
<code>$contextStartOffset</code>
30+
<code>$contextStartOffset</code>
31+
<code>$contextStartOffset</code>
32+
<code>$hunkCapture</code>
33+
<code>$hunkCapture</code>
34+
</InvalidOperand>
35+
<PossiblyUndefinedVariable occurrences="1">
36+
<code>$i</code>
37+
</PossiblyUndefinedVariable>
38+
</file>
39+
<file src="src/Parser.php">
40+
<PossiblyUndefinedVariable occurrences="1">
41+
<code>$diffLines</code>
42+
</PossiblyUndefinedVariable>
43+
</file>
44+
</files>

psalm.xml renamed to .psalm/config.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0"?>
22
<psalm
33
totallyTyped="false"
4-
resolveFromConfigFile="true"
4+
cacheDirectory=".psalm/cache"
5+
errorBaseline=".psalm/baseline.xml"
56
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
67
xmlns="https://getpsalm.org/schema/config"
78
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"

0 commit comments

Comments
 (0)