]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule for uppercase constant definitions
authorJoshua Spence <josh@joshuaspence.com>
Sun, 12 Apr 2015 21:21:39 +0000 (07:21 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Sun, 12 Apr 2015 21:23:02 +0000 (07:23 +1000)
commitf86f4f24e617242652d4ed294e58071339aeff15
tree455641d1156fc1a80bc011c7603dd4a5ee45edb5
parentbf1b30ae26356dd703382c8a6ef77729693d46fc
Add a linter rule for uppercase constant definitions

Summary: Ref T7409. Adds a linter rule to ensure that constant are defined as being uppercase. Based on [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php | Generic_Sniffs_NamingConventions_UpperCaseConstantNameSniff]].

Test Plan: Added test cases.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7409

Differential Revision: https://secure.phabricator.com/D12366
src/lint/linter/ArcanistXHPASTLinter.php
src/lint/linter/__tests__/xhpast/constant-case.lint-test [new file with mode: 0644]
src/lint/linter/__tests__/xhpast/dynamic-define.lint-test