Skip to content

Commit

Permalink
Integration tests - Slevomat Coding Standard
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 20, 2020
1 parent 4e23fa7 commit 5eba0b2
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,13 @@ jobs:
git checkout v0.7.36
composer install
../../../phpstan.phar analyse -c ../rector.neon
- |
git clone https://github.com/slevomat/coding-standard.git e2e/integration/repo
cd e2e/integration/repo
git checkout 6.3.9
composer install
../../../phpstan.phar analyse -c ../slevomat-cs.neon -l 7 SlevomatCodingStandard
../../../phpstan.phar analyse -c build/PHPStan/phpstan.tests.neon -l 7 tests
steps:
- name: "Checkout"
Expand Down
72 changes: 72 additions & 0 deletions e2e/integration/slevomat-cs-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
parameters:
ignoreErrors:
-
message: "#^Method SlevomatCodingStandard\\\\Sniffs\\\\Classes\\\\AbstractMethodSignature\\:\\:getSignatureStartAndEndPointers\\(\\) should return array\\<int, int\\> but returns array\\<int, int\\|null\\>\\.$#"
count: 1
path: repo/SlevomatCodingStandard/Sniffs/Classes/AbstractMethodSignature.php

-
message: "#^Parameter \\#1 \\$error of method PHP_CodeSniffer\\\\Files\\\\File\\:\\:addError\\(\\) expects string, int\\|string given\\.$#"
count: 1
path: repo/SlevomatCodingStandard/Sniffs/Classes/TraitUseSpacingSniff.php

-
message: "#^Parameter \\#1 \\$error of method PHP_CodeSniffer\\\\Files\\\\File\\:\\:addFixableError\\(\\) expects string, int\\|string given\\.$#"
count: 1
path: repo/SlevomatCodingStandard/Sniffs/Classes/TraitUseSpacingSniff.php

-
message: "#^Parameter \\#1 \\$error of method PHP_CodeSniffer\\\\Files\\\\File\\:\\:addError\\(\\) expects string, int\\|string given\\.$#"
count: 10
path: repo/SlevomatCodingStandard/Sniffs/Commenting/InlineDocCommentDeclarationSniff.php

-
message: "#^Parameter \\#1 \\$error of method PHP_CodeSniffer\\\\Files\\\\File\\:\\:addError\\(\\) expects string, int\\|string given\\.$#"
count: 1
path: repo/SlevomatCodingStandard/Sniffs/ControlStructures/DisallowYodaComparisonSniff.php

-
message: "#^Parameter \\#1 \\$error of method PHP_CodeSniffer\\\\Files\\\\File\\:\\:addFixableError\\(\\) expects string, int\\|string given\\.$#"
count: 1
path: repo/SlevomatCodingStandard/Sniffs/ControlStructures/DisallowYodaComparisonSniff.php

-
message: "#^Parameter \\#1 \\$error of method PHP_CodeSniffer\\\\Files\\\\File\\:\\:addError\\(\\) expects string, int\\|string given\\.$#"
count: 2
path: repo/SlevomatCodingStandard/Sniffs/ControlStructures/RequireTernaryOperatorSniff.php

-
message: "#^Parameter \\#1 \\$error of method PHP_CodeSniffer\\\\Files\\\\File\\:\\:addFixableError\\(\\) expects string, int\\|string given\\.$#"
count: 2
path: repo/SlevomatCodingStandard/Sniffs/ControlStructures/RequireTernaryOperatorSniff.php

-
message: "#^Parameter \\#1 \\$error of method PHP_CodeSniffer\\\\Files\\\\File\\:\\:addError\\(\\) expects string, int\\|string given\\.$#"
count: 2
path: repo/SlevomatCodingStandard/Sniffs/ControlStructures/UselessIfConditionWithReturnSniff.php

-
message: "#^Parameter \\#1 \\$error of method PHP_CodeSniffer\\\\Files\\\\File\\:\\:addFixableError\\(\\) expects string, int\\|string given\\.$#"
count: 2
path: repo/SlevomatCodingStandard/Sniffs/ControlStructures/UselessIfConditionWithReturnSniff.php

-
message: "#^Parameter \\#1 \\$error of method PHP_CodeSniffer\\\\Files\\\\File\\:\\:addError\\(\\) expects string, int\\|string given\\.$#"
count: 1
path: repo/SlevomatCodingStandard/Sniffs/ControlStructures/UselessTernaryOperatorSniff.php

-
message: "#^Parameter \\#1 \\$error of method PHP_CodeSniffer\\\\Files\\\\File\\:\\:addFixableError\\(\\) expects string, int\\|string given\\.$#"
count: 1
path: repo/SlevomatCodingStandard/Sniffs/ControlStructures/UselessTernaryOperatorSniff.php

-
message: "#^Parameter \\#1 \\$error of method PHP_CodeSniffer\\\\Files\\\\File\\:\\:addError\\(\\) expects string, int\\|string given\\.$#"
count: 1
path: repo/SlevomatCodingStandard/Sniffs/Variables/UselessVariableSniff.php

-
message: "#^Parameter \\#1 \\$error of method PHP_CodeSniffer\\\\Files\\\\File\\:\\:addFixableError\\(\\) expects string, int\\|string given\\.$#"
count: 1
path: repo/SlevomatCodingStandard/Sniffs/Variables/UselessVariableSniff.php

3 changes: 3 additions & 0 deletions e2e/integration/slevomat-cs.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
includes:
- slevomat-cs-baseline.neon
- repo/build/PHPStan/phpstan.neon

0 comments on commit 5eba0b2

Please sign in to comment.