1
0
Fork 0

Fix sniff issues, exclude 'cases' test files from codesniff

pull/357/head
Rob Lourens 2017-06-07 18:26:58 -07:00
parent 68656d9663
commit 4ade5fdbb2
3 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,7 @@
<ruleset name="PHP Language Server"> <ruleset name="PHP Language Server">
<file>src</file> <file>src</file>
<file>tests</file> <file>tests</file>
<exclude-pattern>tests/Validation/cases</exclude-pattern>
<rule ref="PSR2"> <rule ref="PSR2">
<exclude name="PSR2.Namespaces.UseDeclaration.MultipleDeclarations"/> <exclude name="PSR2.Namespaces.UseDeclaration.MultipleDeclarations"/>
<exclude name="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed"/> <exclude name="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed"/>

View File

@ -121,4 +121,4 @@ function isConstDefineExpression(Node $node): bool
&& isset($node->argumentExpressionList->children[0]) && isset($node->argumentExpressionList->children[0])
&& $node->argumentExpressionList->children[0]->expression instanceof Node\StringLiteral && $node->argumentExpressionList->children[0]->expression instanceof Node\StringLiteral
&& isset($node->argumentExpressionList->children[2]); && isset($node->argumentExpressionList->children[2]);
} }

View File

@ -43,8 +43,8 @@ class ValidationTest extends TestCase
} }
/** /**
* This test loads the test cases specified in .php files under cases/ and looks at the whole set of * This test loads the test cases specified in .php files under cases/ and looks at the whole set of
* Definitions and References produced. It reads the expected results from associated .json files * Definitions and References produced. It reads the expected results from associated .json files
* and compares to the actual result. If they don't match, the test fails and it writes the new baseline * and compares to the actual result. If they don't match, the test fails and it writes the new baseline
* to the .json file. * to the .json file.
* @group validation * @group validation