From fceac878f112c8301997c24d8b1ecf0c60db58e4 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Wed, 15 May 2019 09:03:02 +1000 Subject: [PATCH] Allow `setCustomSeverityRules` to be overridden in subclasses Summary: I am writing a proxy linter that can be used to wrap any `ArcanistExternalLinter` and execute all commands within a Docker container (see [[https://github.com/freelancer/flarc/blob/master/src/lint/linter/ArcanistDockerContainerLinterProxy.php |`ArcanistDockerContainerLinterProxy`]] from [[https://github.com/freelancer/flarc | `flarc`]]). In order for `ArcanistDockerContainerLinterProxy` to behave like the `ArcanistExternalLinter` that is being proxied, `final` needs to be removed from some methods. I figured this was reasonable to submit upstream as a similar change ({D19630}) was previously accepted. Test Plan: N/A Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D20514 --- src/lint/linter/ArcanistLinter.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lint/linter/ArcanistLinter.php b/src/lint/linter/ArcanistLinter.php index 6bb02e5d..afb8cbe3 100644 --- a/src/lint/linter/ArcanistLinter.php +++ b/src/lint/linter/ArcanistLinter.php @@ -214,9 +214,6 @@ abstract class ArcanistLinter extends Phobject { return 1.0; } - /** - * TODO: This should be `final`. - */ public function setCustomSeverityMap(array $map) { $this->customSeverityMap = $map; return $this; @@ -227,7 +224,7 @@ abstract class ArcanistLinter extends Phobject { return $this; } - final public function setCustomSeverityRules(array $rules) { + public function setCustomSeverityRules(array $rules) { $this->customSeverityRules = $rules; return $this; }