1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00

Update .arclint in Phabricator for phutil-library lint

Summary:
Also fix a few other minor issues:

  - Use lint config.
  - Fix a method signature from `arc unit --everything` (unrelated).
  - Add a javelin doc.

Test Plan: Ran `arc lint`, `arc unit`, `arc linters`.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9072
This commit is contained in:
epriestley 2014-05-12 06:01:30 -07:00
parent 566f8ab9aa
commit 23487dc357
5 changed files with 34 additions and 9 deletions

View file

@ -2,7 +2,5 @@
"project.name" : "phabricator",
"phabricator.uri" : "https://secure.phabricator.com/",
"unit.engine" : "PhutilUnitTestEngine",
"load" : ["src/"],
"lint.xhpast.naminghook" : "PhabricatorSymbolNameLinter",
"lint.jshint.config" : "support/jshint/jshintconfig"
"load" : ["src/"]
}

View file

@ -22,7 +22,8 @@
"exclude": [
"(^externals/JsShrink/)",
"(^webroot/rsrc/externals/raphael/)"
]
],
"flags": ["--config=support/jshint/jshintconfig"]
},
"generated": {
"type": "generated"
@ -40,8 +41,24 @@
"phutil_escape_html": "The phutil_escape_html() function is deprecated. Raw strings passed to phutil_tag() or hsprintf() are escaped automatically."
}
},
"phutil-library": {
"type": "phutil-library",
"include": "(\\.php$)"
},
"text": {
"type": "text"
"type": "text",
"exclude": [
"(^\\.arclint)"
]
},
"text-without-length": {
"type": "text",
"severity": {
"3": "disabled"
},
"include": [
"(^\\.arclint)"
]
},
"spelling": {
"type": "spelling"
@ -55,7 +72,8 @@
"31": "error",
"34": "error",
"35": "error"
}
},
"xhpast.naminghook": "PhabricatorSymbolNameLinter"
}
}
}

View file

@ -1648,7 +1648,6 @@ phutil_register_library_map(array(
'PhabricatorKeyValueDatabaseCache' => 'applications/cache/PhabricatorKeyValueDatabaseCache.php',
'PhabricatorLegalpadConfigOptions' => 'applications/legalpad/config/PhabricatorLegalpadConfigOptions.php',
'PhabricatorLegalpadPHIDTypeDocument' => 'applications/legalpad/phid/PhabricatorLegalpadPHIDTypeDocument.php',
'PhabricatorLintEngine' => 'infrastructure/lint/PhabricatorLintEngine.php',
'PhabricatorLipsumArtist' => 'applications/lipsum/image/PhabricatorLipsumArtist.php',
'PhabricatorLipsumGenerateWorkflow' => 'applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php',
'PhabricatorLipsumManagementWorkflow' => 'applications/lipsum/management/PhabricatorLipsumManagementWorkflow.php',
@ -4441,7 +4440,6 @@ phutil_register_library_map(array(
'PhabricatorKeyValueDatabaseCache' => 'PhutilKeyValueCache',
'PhabricatorLegalpadConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorLegalpadPHIDTypeDocument' => 'PhabricatorPHIDType',
'PhabricatorLintEngine' => 'PhutilLintEngine',
'PhabricatorLipsumGenerateWorkflow' => 'PhabricatorLipsumManagementWorkflow',
'PhabricatorLipsumManagementWorkflow' => 'PhabricatorManagementWorkflow',
'PhabricatorLipsumMondrianArtist' => 'PhabricatorLipsumArtist',

View file

@ -13,6 +13,17 @@ final class PhabricatorJavelinLinter extends ArcanistLinter {
const LINT_UNKNOWN_DEPENDENCY = 4;
const LINT_MISSING_BINARY = 5;
public function getInfoName() {
return 'Javelin Linter';
}
public function getInfoDescription() {
return pht(
'This linter is intended for use with the Javelin JS library and '.
'extensions. Use `javelinsymbols` to run Javelin rules on Javascript '.
'source files.');
}
private function getBinaryPath() {
if ($this->symbolsBinary === null) {
list($err, $stdout) = exec_manual('which javelinsymbols');

View file

@ -7,7 +7,7 @@ final class PhabricatorSMSSendWorker
return PhabricatorSMS::MAXIMUM_SEND_TRIES;
}
public function getWaitBeforeRetry() {
public function getWaitBeforeRetry(PhabricatorWorkerTask $task) {
return phutil_units('1 minute in seconds');
}