]> khamidou — GitHub mirrors - arcanist.git/commit
Fix a fatal error in `ArcanistXHPASTLinter`
authorJoshua Spence <josh@joshuaspence.com>
Wed, 24 Sep 2014 21:33:24 +0000 (07:33 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Wed, 24 Sep 2014 21:33:24 +0000 (07:33 +1000)
commit13492c8043a4f04c9b270fda3d6b5f05267667e2
tree175fc5be800434665eaa38ac615a482e29e846af
parent888ada2f380cb951d6fd3e94d1087643527f381b
Fix a fatal error in `ArcanistXHPASTLinter`

Summary: I had assumed that we would always be interested in `n_STATEMENT_LIST`, which is fine for `if (...) { some_statements(); }` but not for `if (...) one_statement();`.

Test Plan: Added a test case.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10551
src/lint/linter/ArcanistXHPASTLinter.php
src/lint/linter/__tests__/xhpast/conditional-usage.lint-test