mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +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:
parent
f44a6e00a7
commit
8547a25928
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue