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
- calltimepassbyref
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 2645 Build 2649: [Placeholder Plan] Wait for 30 Seconds
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