Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14007157
D9664.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D9664.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -154,7 +154,6 @@
'ArcanistRevertWorkflow' => 'workflow/ArcanistRevertWorkflow.php',
'ArcanistRubyLinter' => 'lint/linter/ArcanistRubyLinter.php',
'ArcanistRubyLinterTestCase' => 'lint/linter/__tests__/ArcanistRubyLinterTestCase.php',
- 'ArcanistScalaSBTLinter' => 'lint/linter/ArcanistScalaSBTLinter.php',
'ArcanistScriptAndRegexLinter' => 'lint/linter/ArcanistScriptAndRegexLinter.php',
'ArcanistSetConfigWorkflow' => 'workflow/ArcanistSetConfigWorkflow.php',
'ArcanistSettings' => 'configuration/ArcanistSettings.php',
@@ -328,7 +327,6 @@
'ArcanistRevertWorkflow' => 'ArcanistBaseWorkflow',
'ArcanistRubyLinter' => 'ArcanistExternalLinter',
'ArcanistRubyLinterTestCase' => 'ArcanistArcanistLinterTestCase',
- 'ArcanistScalaSBTLinter' => 'ArcanistExternalLinter',
'ArcanistScriptAndRegexLinter' => 'ArcanistLinter',
'ArcanistSetConfigWorkflow' => 'ArcanistBaseWorkflow',
'ArcanistShellCompleteWorkflow' => 'ArcanistBaseWorkflow',
diff --git a/src/lint/linter/ArcanistScalaSBTLinter.php b/src/lint/linter/ArcanistScalaSBTLinter.php
deleted file mode 100644
--- a/src/lint/linter/ArcanistScalaSBTLinter.php
+++ /dev/null
@@ -1,108 +0,0 @@
-<?php
-
-/**
- * Uses `sbt compile` to detect various warnings/errors in Scala code.
- */
-final class ArcanistScalaSBTLinter extends ArcanistExternalLinter {
-
- public function getInfoName() {
- return 'sbt';
- }
-
- public function getInfoURI() {
- return 'http://www.scala-sbt.org';
- }
-
- public function getInfoDescription() {
- return pht('sbt is a build tool for Scala, Java, and more.');
- }
-
- public function getLinterName() {
- return 'ScalaSBT';
- }
-
- public function getLinterConfigurationName() {
- return 'scala-sbt';
- }
-
- public function getDefaultBinary() {
- $prefix = $this->getDeprecatedConfiguration('lint.scala_sbt.prefix');
- $bin = 'sbt';
-
- if ($prefix) {
- return $prefix.'/'.$bin;
- } else {
- return $bin;
- }
- }
-
- public function getVersion() {
- // NOTE: `sbt --version` returns a non-zero exit status.
- list($err, $stdout) = exec_manual(
- '%C --version',
- $this->getExecutableCommand());
-
- $matches = array();
- $regex = '/^sbt launcher version (?P<version>\d+\.\d+\.\d+)$/';
- if (preg_match($regex, $stdout, $matches)) {
- return $matches['version'];
- } else {
- return false;
- }
- }
-
- public function getInstallInstructions() {
- return pht(
- 'Check <http://www.scala-sbt.org> for installation instructions.');
- }
-
- public function shouldExpectCommandErrors() {
- return true;
- }
-
- protected function getMandatoryFlags() {
- return array(
- '-Dsbt.log.noformat=true',
- 'compile',
- );
- }
-
- protected function parseLinterOutput($path, $err, $stdout, $stderr) {
- $lines = phutil_split_lines($stdout, false);
- $messages = array();
-
- foreach ($lines as $line) {
- $matches = null;
- $regex = '/\[(warn|error)\] (.*?):(\d+): (.*?)$/';
- if (!preg_match($regex, $line, $matches)) {
- continue;
- }
- foreach ($matches as $key => $match) {
- $matches[$key] = trim($match);
- }
-
- $message = new ArcanistLintMessage();
- $message->setPath($matches[2]);
- $message->setLine($matches[3]);
- $message->setCode($this->getLinterName());
- $message->setDescription($matches[4]);
-
- switch ($matches[1]) {
- case 'error':
- $message->setSeverity(ArcanistLintSeverity::SEVERITY_ERROR);
- break;
- case 'warn':
- $message->setSeverity(ArcanistLintSeverity::SEVERITY_WARNING);
- break;
- default:
- $message->setSeverity(ArcanistLintSeverity::SEVERITY_ADVICE);
- break;
- }
-
- $messages[] = $message;
- }
-
- return $messages;
- }
-
-}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 30, 12:42 AM (2 w, 11 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6736252
Default Alt Text
D9664.diff (3 KB)
Attached To
Mode
D9664: Remove the `ArcanistScalaSBTLinter`
Attached
Detach File
Event Timeline
Log In to Comment