Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15500880
D15298.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
D15298.diff
View Options
diff --git a/src/lint/linter/ArcanistLinter.php b/src/lint/linter/ArcanistLinter.php
--- a/src/lint/linter/ArcanistLinter.php
+++ b/src/lint/linter/ArcanistLinter.php
@@ -577,10 +577,10 @@
foreach ($standards as $standard) {
$standard = ArcanistLinterStandard::getStandard($value, $this);
- foreach ($standard->getLinterConfiguration() as $k => $v) {
+ foreach ($standard->getLinterConfiguration($this) as $k => $v) {
$this->setLinterConfigurationValue($k, $v);
}
- $this->addCustomSeverityMap($standard->getLinterSeverityMap());
+ $this->addCustomSeverityMap($standard->getLinterSeverityMap($this));
}
return;
diff --git a/src/lint/linter/standards/ArcanistLinterStandard.php b/src/lint/linter/standards/ArcanistLinterStandard.php
--- a/src/lint/linter/standards/ArcanistLinterStandard.php
+++ b/src/lint/linter/standards/ArcanistLinterStandard.php
@@ -47,9 +47,10 @@
* Returns linter configuration which is passed to
* @{method:ArcanistLinter::setLinterConfigurationValue}.
*
+ * @param ArcanistLinter The linter which is being configured.
* @return map<string, wild>
*/
- public function getLinterConfiguration() {
+ public function getLinterConfiguration(ArcanistLinter $linter) {
return array();
}
@@ -59,9 +60,10 @@
* Returns linter severities which are passed to
* @{method:ArcanistLinter::addCustomSeverityMap}.
*
+ * @param ArcanistLinter The linter which is being configured.
* @return map
*/
- public function getLinterSeverityMap() {
+ public function getLinterSeverityMap(ArcanistLinter $linter) {
return array();
}
diff --git a/src/lint/linter/standards/phutil/ArcanistPhutilXHPASTLinterStandard.php b/src/lint/linter/standards/phutil/ArcanistPhutilXHPASTLinterStandard.php
--- a/src/lint/linter/standards/phutil/ArcanistPhutilXHPASTLinterStandard.php
+++ b/src/lint/linter/standards/phutil/ArcanistPhutilXHPASTLinterStandard.php
@@ -19,7 +19,7 @@
return $linter instanceof ArcanistXHPASTLinter;
}
- public function getLinterConfiguration() {
+ public function getLinterConfiguration(ArcanistLinter $linter) {
return array(
'xhpast.blacklisted.function' => array(
'eval' => pht(
@@ -55,7 +55,7 @@
);
}
- public function getLinterSeverityMap() {
+ public function getLinterSeverityMap(ArcanistLinter $linter) {
$advice = ArcanistLintSeverity::SEVERITY_ADVICE;
$error = ArcanistLintSeverity::SEVERITY_ERROR;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 14, 7:47 PM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7736490
Default Alt Text
D15298.diff (2 KB)
Attached To
Mode
D15298: Allow linter standards to be used with different linter types
Attached
Detach File
Event Timeline
Log In to Comment