]> khamidou — GitHub mirrors - arcanist.git/commit
Fix two linter issues
authorepriestley <git@epriestley.com>
Tue, 30 Dec 2014 18:02:43 +0000 (10:02 -0800)
committerepriestley <git@epriestley.com>
Tue, 30 Dec 2014 18:02:43 +0000 (10:02 -0800)
commita3c3d23dd7701f332daf0bfb87b0c83fc9c4c6fe
tree7af20f015a4b9ad61c8f44c3eb74bb3254a681e5
parent721bdf424bf33692ffe338b67e38072b742c92bb
Fix two linter issues

Summary:
  - The "exclude static variable access" branch in XHPAST incorrectly excluded all variables in a function or method which used any static access (we were selecting the wrong root node for exclusion).
  - The "PHPLinter" regexp did not work with 5.4.30. Make it more permissive in what it parses.

Test Plan:
  - Added a failing unit test for the variable case and made it pass.
  - PHPLinter tests now pass under 5.4.30

Reviewers: joshuaspence, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D11087
src/lint/linter/ArcanistPhpLinter.php
src/lint/linter/ArcanistXHPASTLinter.php
src/lint/linter/__tests__/xhpast/naming-conventions.lint-test