Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13971536
D9070.id21546.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D9070.id21546.diff
View Options
diff --git a/.arclint b/.arclint
--- a/.arclint
+++ b/.arclint
@@ -20,6 +20,10 @@
"type": "phutil-xhpast",
"include": "(\\.php$)"
},
+ "phutil-library": {
+ "type": "phutil-library",
+ "include": "(\\.php$)"
+ },
"text": {
"type": "text"
},
diff --git a/src/lint/linter/ArcanistPhutilLibraryLinter.php b/src/lint/linter/ArcanistPhutilLibraryLinter.php
--- a/src/lint/linter/ArcanistPhutilLibraryLinter.php
+++ b/src/lint/linter/ArcanistPhutilLibraryLinter.php
@@ -7,8 +7,6 @@
* # If you define a symbol, it must not duplicate another definition.
* # If you define a class or interface in a file, it MUST be the only symbol
* defined in that file.
- *
- * @group linter
*/
final class ArcanistPhutilLibraryLinter extends ArcanistLinter {
@@ -16,6 +14,20 @@
const LINT_DUPLICATE_SYMBOL = 2;
const LINT_ONE_CLASS_PER_FILE = 3;
+ public function getInfoName() {
+ return 'Phutil Library Linter';
+ }
+
+ public function getInfoDescription() {
+ return pht(
+ 'Make sure all the symbols use in a libphutil library are defined and '.
+ 'known. This linter is specific to PHP source in libphutil libraries.');
+ }
+
+ public function getLinterConfigurationName() {
+ return 'phutil-library';
+ }
+
public function getLintNameMap() {
return array(
self::LINT_UNKNOWN_SYMBOL => 'Unknown Symbol',
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
@@ -10,6 +10,16 @@
private $dynamicStringFunctions = array();
private $dynamicStringClasses = array();
+ public function getInfoName() {
+ return 'XHPAST/libphutil Lint';
+ }
+
+ public function getInfoDescription() {
+ return pht(
+ 'Use XHPAST to run libphutil-specific rules on a PHP library. This '.
+ 'linter is intended for use in Phabricator libraries and extensions.');
+ }
+
public function setDeprecatedFunctions($map) {
$this->deprecatedFunctions = $map;
return $this;
diff --git a/src/lint/linter/ArcanistXHPASTLinter.php b/src/lint/linter/ArcanistXHPASTLinter.php
--- a/src/lint/linter/ArcanistXHPASTLinter.php
+++ b/src/lint/linter/ArcanistXHPASTLinter.php
@@ -47,6 +47,18 @@
private $naminghook;
private $switchhook;
+ public function getInfoName() {
+ return 'XHPAST Lint';
+ }
+
+ public function getInfoDescription() {
+ return pht(
+ 'Use XHPAST to enforce Phabricator coding conventions on PHP source '.
+ 'files. This linter is intended for use in Phabricator libraries and '.
+ 'extensions, and enforces some Phabricator-specific style rules. It '.
+ 'may not work well for general PHP source.');
+ }
+
public function getLintNameMap() {
return array(
self::LINT_PHP_SYNTAX_ERROR => 'PHP Syntax Error!',
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 18, 1:52 PM (3 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6727233
Default Alt Text
D9070.id21546.diff (2 KB)
Attached To
Mode
D9070: Fill out some more info functions for libphutil-specific linters
Attached
Detach File
Event Timeline
Log In to Comment