Call-time pass-by-reference is an awful "feature" of PHP that is deprecated and removed in PHP 5.4 (see http://us1.php.net/manual/en/migration54.incompatible.php). Add a linter rule to ArcanistXHPASTLinter to detect the use of this feature and raise an error.
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- rARC1a3afa44297f: Add a linter rule to detect call-time pass-by-reference
Added a test case for arc unit.
Diff Detail
Diff Detail
- Repository
- rARC Arcanist
- Branch
- master
- Lint
Lint Passed - Unit
Test Failures - Build Status
Buildable 3575 Build 3583: [Placeholder Plan] Wait for 30 Seconds
Time | Test | |
---|---|---|
3,863 ms | ArcanistXHPASTLinterTestCase::testLinter | |
538 ms | ArcanistCSSLintLinterTestCase::testLinter | |
208 ms | ArcanistCSSLintLinterTestCase::testVersion | |
200 ms | ArcanistClosureLinterTestCase::testLinter | |
57 ms | ArcanistClosureLinterTestCase::testVersion | |
View Full Test Results (1 Failed · 32 Passed · 14 Skipped) |
Event Timeline
Comment Actions
I'm not quite sure why this isn't working as is, possibly an issue with XHPAST?
Assertion failed, expected values to be equal (at ArcanistLinterTestCase.php:130): Some linters failed: - ArcanistXHPASTLinter: Exception: No type name for node type ID '0' in 'XHP' AAST. #0 /home/joshua/workspace/github.com/phacility/arcanist/src/lint/linter/__tests__/ArcanistLinterTestCase.php(100): ArcanistLintEngine->run() #1 /home/joshua/workspace/github.com/phacility/arcanist/src/lint/linter/__tests__/ArcanistLinterTestCase.php(16): ArcanistLinterTestCase->lintFile('/home/joshua/wo...', Object(ArcanistXHPASTLinter)) #2 /home/joshua/workspace/github.com/phacility/arcanist/src/lint/linter/__tests__/ArcanistXHPASTLinterTestCase.php(9): ArcanistLinterTestCase->executeTestsInDirectory('/home/joshua/wo...', Object(ArcanistXHPASTLinter)) #3 [internal function]: ArcanistXHPASTLinterTestCase->testXHPASTLint() #4 /home/joshua/workspace/github.com/phacility/arcanist/src/unit/engine/phutil/ArcanistPhutilTestCase.php(484): call_user_func_array(Array, Array) #5 /home/joshua/workspace/github.com/phacility/arcanist/src/unit/engine/PhutilUnitTestEngine.php(58): ArcanistPhutilTestCase->run() #6 /home/joshua/workspace/github.com/phacility/arcanist/src/workflow/ArcanistUnitWorkflow.php(171): PhutilUnitTestEngine->run() #7 /home/joshua/workspace/github.com/phacility/arcanist/scripts/arcanist.php(338): ArcanistUnitWorkflow->run() #8 {main} Expected: false Actual: true