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:
parent
566f8ab9aa
commit
23487dc357
5 changed files with 34 additions and 9 deletions
|
@ -2,7 +2,5 @@
|
||||||
"project.name" : "phabricator",
|
"project.name" : "phabricator",
|
||||||
"phabricator.uri" : "https://secure.phabricator.com/",
|
"phabricator.uri" : "https://secure.phabricator.com/",
|
||||||
"unit.engine" : "PhutilUnitTestEngine",
|
"unit.engine" : "PhutilUnitTestEngine",
|
||||||
"load" : ["src/"],
|
"load" : ["src/"]
|
||||||
"lint.xhpast.naminghook" : "PhabricatorSymbolNameLinter",
|
|
||||||
"lint.jshint.config" : "support/jshint/jshintconfig"
|
|
||||||
}
|
}
|
||||||
|
|
24
.arclint
24
.arclint
|
@ -22,7 +22,8 @@
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"(^externals/JsShrink/)",
|
"(^externals/JsShrink/)",
|
||||||
"(^webroot/rsrc/externals/raphael/)"
|
"(^webroot/rsrc/externals/raphael/)"
|
||||||
]
|
],
|
||||||
|
"flags": ["--config=support/jshint/jshintconfig"]
|
||||||
},
|
},
|
||||||
"generated": {
|
"generated": {
|
||||||
"type": "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_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": {
|
"text": {
|
||||||
"type": "text"
|
"type": "text",
|
||||||
|
"exclude": [
|
||||||
|
"(^\\.arclint)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"text-without-length": {
|
||||||
|
"type": "text",
|
||||||
|
"severity": {
|
||||||
|
"3": "disabled"
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"(^\\.arclint)"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"spelling": {
|
"spelling": {
|
||||||
"type": "spelling"
|
"type": "spelling"
|
||||||
|
@ -55,7 +72,8 @@
|
||||||
"31": "error",
|
"31": "error",
|
||||||
"34": "error",
|
"34": "error",
|
||||||
"35": "error"
|
"35": "error"
|
||||||
}
|
},
|
||||||
|
"xhpast.naminghook": "PhabricatorSymbolNameLinter"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1648,7 +1648,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorKeyValueDatabaseCache' => 'applications/cache/PhabricatorKeyValueDatabaseCache.php',
|
'PhabricatorKeyValueDatabaseCache' => 'applications/cache/PhabricatorKeyValueDatabaseCache.php',
|
||||||
'PhabricatorLegalpadConfigOptions' => 'applications/legalpad/config/PhabricatorLegalpadConfigOptions.php',
|
'PhabricatorLegalpadConfigOptions' => 'applications/legalpad/config/PhabricatorLegalpadConfigOptions.php',
|
||||||
'PhabricatorLegalpadPHIDTypeDocument' => 'applications/legalpad/phid/PhabricatorLegalpadPHIDTypeDocument.php',
|
'PhabricatorLegalpadPHIDTypeDocument' => 'applications/legalpad/phid/PhabricatorLegalpadPHIDTypeDocument.php',
|
||||||
'PhabricatorLintEngine' => 'infrastructure/lint/PhabricatorLintEngine.php',
|
|
||||||
'PhabricatorLipsumArtist' => 'applications/lipsum/image/PhabricatorLipsumArtist.php',
|
'PhabricatorLipsumArtist' => 'applications/lipsum/image/PhabricatorLipsumArtist.php',
|
||||||
'PhabricatorLipsumGenerateWorkflow' => 'applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php',
|
'PhabricatorLipsumGenerateWorkflow' => 'applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php',
|
||||||
'PhabricatorLipsumManagementWorkflow' => 'applications/lipsum/management/PhabricatorLipsumManagementWorkflow.php',
|
'PhabricatorLipsumManagementWorkflow' => 'applications/lipsum/management/PhabricatorLipsumManagementWorkflow.php',
|
||||||
|
@ -4441,7 +4440,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorKeyValueDatabaseCache' => 'PhutilKeyValueCache',
|
'PhabricatorKeyValueDatabaseCache' => 'PhutilKeyValueCache',
|
||||||
'PhabricatorLegalpadConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
'PhabricatorLegalpadConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
||||||
'PhabricatorLegalpadPHIDTypeDocument' => 'PhabricatorPHIDType',
|
'PhabricatorLegalpadPHIDTypeDocument' => 'PhabricatorPHIDType',
|
||||||
'PhabricatorLintEngine' => 'PhutilLintEngine',
|
|
||||||
'PhabricatorLipsumGenerateWorkflow' => 'PhabricatorLipsumManagementWorkflow',
|
'PhabricatorLipsumGenerateWorkflow' => 'PhabricatorLipsumManagementWorkflow',
|
||||||
'PhabricatorLipsumManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
'PhabricatorLipsumManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
||||||
'PhabricatorLipsumMondrianArtist' => 'PhabricatorLipsumArtist',
|
'PhabricatorLipsumMondrianArtist' => 'PhabricatorLipsumArtist',
|
||||||
|
|
|
@ -13,6 +13,17 @@ final class PhabricatorJavelinLinter extends ArcanistLinter {
|
||||||
const LINT_UNKNOWN_DEPENDENCY = 4;
|
const LINT_UNKNOWN_DEPENDENCY = 4;
|
||||||
const LINT_MISSING_BINARY = 5;
|
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() {
|
private function getBinaryPath() {
|
||||||
if ($this->symbolsBinary === null) {
|
if ($this->symbolsBinary === null) {
|
||||||
list($err, $stdout) = exec_manual('which javelinsymbols');
|
list($err, $stdout) = exec_manual('which javelinsymbols');
|
||||||
|
|
|
@ -7,7 +7,7 @@ final class PhabricatorSMSSendWorker
|
||||||
return PhabricatorSMS::MAXIMUM_SEND_TRIES;
|
return PhabricatorSMS::MAXIMUM_SEND_TRIES;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getWaitBeforeRetry() {
|
public function getWaitBeforeRetry(PhabricatorWorkerTask $task) {
|
||||||
return phutil_units('1 minute in seconds');
|
return phutil_units('1 minute in seconds');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue