1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-23 05:50:54 +01:00

Fix LINT_KEYWORD_CASING for class keyword

Summary: D10653 didn't quite cut it.

Test Plan: Tested on a real file.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D10656
This commit is contained in:
Joshua Spence 2014-10-08 09:26:36 +11:00
parent f44a6e00a7
commit 8547a25928

View file

@ -2553,6 +2553,11 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
$keywords[] = head($invocation->getTokens());
}
$class_declarations = $root->selectDescendantsOfType('n_CLASS_DECLARATION');
foreach ($class_declarations as $declaration) {
$keywords[] = head($declaration->getTokens());
}
// NOTE: Although PHP generally allows arbitrary casing for all language
// keywords, it's exceedingly rare for anyone to type, e.g., "CLASS" or
// "cLaSs" in the wild. This list just attempts to cover unconventional