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.

Includes minor formatting fixes to the PHPStan config file.
  • Loading branch information
jrfnl committed Nov 12, 2023
1 parent 6ac68fc commit 5f68d61
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint'
- 'phpstan.neon*'

# Rule documentation: https://yamllint.readthedocs.io/en/stable/rules.html
rules:
Expand Down
14 changes: 9 additions & 5 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:
- phpcsutils-autoload.php
Expand All @@ -14,6 +14,8 @@ parameters:
treatPhpDocTypesAsCertain: false

ignoreErrors:
# yamllint disable rule:line-length

# Level 0
# Ignoring this as availability depends on which PHPUnit Polyfills version is loaded/installed. This is 100% okay.
-
Expand Down Expand Up @@ -72,10 +74,10 @@ parameters:
-
message: '`^Parameter #[0-9]+ \$\S+ of static method PHPCSUtils\\(?!Tests)[A-Za-z]+\\[A-Za-z]+::[A-Za-z]+\(\) expects [^,]+, \S+ given\.$`'
paths:
- Tests/BackCompat/BCFile/GetTokensAsStringTest.php
- Tests/Exceptions/TestTargetNotFound/TestTargetNotFoundTest.php
- Tests/Fixers/SpacesFixer/SpacesFixerExceptionsTest.php
- Tests/Utils/GetTokensAsString/GetTokensAsStringTest.php
- Tests/BackCompat/BCFile/GetTokensAsStringTest.php
- Tests/Exceptions/TestTargetNotFound/TestTargetNotFoundTest.php
- Tests/Fixers/SpacesFixer/SpacesFixerExceptionsTest.php
- Tests/Utils/GetTokensAsString/GetTokensAsStringTest.php

# Ignoring as this is fine.
-
Expand All @@ -93,3 +95,5 @@ parameters:
-
message: '`^Method PHPCSUtils\\Tests\\[^: ]+Test(Case)?::\S+\(\) has parameter \$\S* with no value type specified in iterable type array\.$`'
path: Tests/*

# yamllint enable rule:line-length

0 comments on commit 5f68d61

Please sign in to comment.