Skip to content

Commit

Permalink
GH Actions/yamllint: also scan the PHPStan config
Browse files Browse the repository at this point in the history
... as that is also a YAML file.
  • Loading branch information
jrfnl committed Nov 12, 2023
1 parent a1b963f commit 60b8f97
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint'
- 'phpstan.neon.dist'
- 'phpstan.neon'

# Rule documentation: https://yamllint.readthedocs.io/en/stable/rules.html
rules:
Expand Down
30 changes: 17 additions & 13 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
#phpVersion: 50400 # Needs to be 70100 or higher... sigh...
# phpVersion: 50400 # Needs to be 70100 or higher... sigh...
level: 6
paths:
- Modernize
Expand All @@ -10,6 +10,8 @@ parameters:
treatPhpDocTypesAsCertain: false

ignoreErrors:
# yamllint disable rule:line-length

# Level 1
# Keep to stay in line with parent class.
-
Expand All @@ -22,21 +24,21 @@ parameters:
-
message: '`^Property \S+Sniff::\$(phpVersion|tabWidth) \(int\) in isset\(\) is not nullable\.$`'
paths:
- Modernize\Sniffs\FunctionCalls\DirnameSniff.php
- Universal\Sniffs\Arrays\DuplicateArrayKeySniff.php
- Universal\Sniffs\CodeAnalysis\ConstructorDestructorReturnSniff.php
- Universal\Sniffs\WhiteSpace\CommaSpacingSniff.php
- Universal\Sniffs\WhiteSpace\DisallowInlineTabsSniff.php
- Universal\Sniffs\WhiteSpace\PrecisionAlignmentSniff.php
- Modernize\Sniffs\FunctionCalls\DirnameSniff.php
- Universal\Sniffs\Arrays\DuplicateArrayKeySniff.php
- Universal\Sniffs\CodeAnalysis\ConstructorDestructorReturnSniff.php
- Universal\Sniffs\WhiteSpace\CommaSpacingSniff.php
- Universal\Sniffs\WhiteSpace\DisallowInlineTabsSniff.php
- Universal\Sniffs\WhiteSpace\PrecisionAlignmentSniff.php
-
message: '`^Strict comparison using === between true and false will always evaluate to false\.$`'
paths:
- Modernize\Sniffs\FunctionCalls\DirnameSniff.php
- Universal\Sniffs\Arrays\DuplicateArrayKeySniff.php
- Universal\Sniffs\CodeAnalysis\ConstructorDestructorReturnSniff.php
- Universal\Sniffs\WhiteSpace\CommaSpacingSniff.php
- Universal\Sniffs\WhiteSpace\DisallowInlineTabsSniff.php
- Universal\Sniffs\WhiteSpace\PrecisionAlignmentSniff.php
- Modernize\Sniffs\FunctionCalls\DirnameSniff.php
- Universal\Sniffs\Arrays\DuplicateArrayKeySniff.php
- Universal\Sniffs\CodeAnalysis\ConstructorDestructorReturnSniff.php
- Universal\Sniffs\WhiteSpace\CommaSpacingSniff.php
- Universal\Sniffs\WhiteSpace\DisallowInlineTabsSniff.php
- Universal\Sniffs\WhiteSpace\PrecisionAlignmentSniff.php
-
message: '`^Property PHPCSExtra\\Universal\\Sniffs\\Arrays\\DuplicateArrayKeySniff\:\:\$currentMaxIntKey[GL]t8 \(int\) in isset\(\) is not nullable\.$`'
path: Universal\Sniffs\Arrays\DuplicateArrayKeySniff.php
Expand All @@ -50,3 +52,5 @@ parameters:
# We're not using strict types, so this will be juggled without any issues.
- '#^Parameter \#3 \$value of method \S+File::recordMetric\(\) expects string, \(?(float|int|bool)(<[^>]+>)?(\|(float|int|bool)(<[^>]+>)?)*\)? given\.$#'
- '#^Parameter \#2 \$content of method \S+Fixer::replaceToken\(\) expects string, \(?(float|int|bool)(<[^>]+>)?(\|(float|int|bool)(<[^>]+>)?)*\)? given\.$#'

# yamllint enable rule:line-length

0 comments on commit 60b8f97

Please sign in to comment.