Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14399042
D9066.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9066.diff
View Options
diff --git a/src/lint/linter/ArcanistPhutilXHPASTLinter.php b/src/lint/linter/ArcanistPhutilXHPASTLinter.php
--- a/src/lint/linter/ArcanistPhutilXHPASTLinter.php
+++ b/src/lint/linter/ArcanistPhutilXHPASTLinter.php
@@ -59,6 +59,46 @@
return $version;
}
+ public function getLinterConfigurationOptions() {
+ $options = array(
+ 'phutil-xhpast.deprecated.functions' => array(
+ 'type' => 'optional map<string, string>',
+ 'help' => pht(
+ 'Functions which should should be considered deprecated.'),
+ ),
+ 'phutil-xhpast.dynamic-string.functions' => array(
+ 'type' => 'optional map<string, string>',
+ 'help' => pht(
+ 'Functions which should should not be used because they represent '.
+ 'the unsafe usage of dynamic strings.'),
+ ),
+ 'phutil-xhpast.dynamic-string.classes' => array(
+ 'type' => 'optional map<string, string>',
+ 'help' => pht(
+ 'Classes which should should not be used because they represent the '.
+ 'unsafe usage of dynamic strings.'),
+ ),
+ );
+
+ return $options + parent::getLinterConfigurationOptions();
+ }
+
+ public function setLinterConfigurationValue($key, $value) {
+ switch ($key) {
+ case 'phutil-xhpast.deprecated.functions':
+ $this->setDeprecatedFunctions($value);
+ return;
+ case 'phutil-xhpast.dynamic-string.functions':
+ $this->setDynamicStringFunctions($value);
+ return;
+ case 'phutil-xhpast.dynamic-string.classes':
+ $this->setDynamicStringClasses($value);
+ return;
+ }
+
+ return parent::setLinterConfigurationValue($key, $value);
+ }
+
protected function resolveFuture($path, Future $future) {
$tree = $this->getXHPASTLinter()->getXHPASTTreeForPath($path);
if (!$tree) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 3:38 PM (19 h, 19 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6921535
Default Alt Text
D9066.diff (1 KB)
Attached To
Mode
D9066: Allow `ArcanistPhutilXHPASTLinter` to be configured from `.arclint`.
Attached
Detach File
Event Timeline
Log In to Comment