Page MenuHomePhabricator

D8385.id19921.diff
No OneTemporary

D8385.id19921.diff

diff --git a/src/lint/linter/ArcanistCSSLintLinter.php b/src/lint/linter/ArcanistCSSLintLinter.php
--- a/src/lint/linter/ArcanistCSSLintLinter.php
+++ b/src/lint/linter/ArcanistCSSLintLinter.php
@@ -28,23 +28,15 @@
}
public function getDefaultFlags() {
- $config = $this->getEngine()->getConfigurationManager();
-
- $options = $config->getConfigFromAnySource('lint.csslint.options');
// TODO: Deprecation warning.
-
- return $options;
+ $config = $this->getEngine()->getConfigurationManager();
+ return $config->getConfigFromAnySource('lint.csslint.options');
}
public function getDefaultBinary() {
// TODO: Deprecation warning.
$config = $this->getEngine()->getConfigurationManager();
- $bin = $config->getConfigFromAnySource('lint.csslint.bin');
- if ($bin) {
- return $bin;
- }
-
- return 'csslint';
+ return $config->getConfigFromAnySource('lint.csslint.bin', 'csslint');
}
public function getInstallInstructions() {
diff --git a/src/lint/linter/ArcanistCSharpLinter.php b/src/lint/linter/ArcanistCSharpLinter.php
--- a/src/lint/linter/ArcanistCSharpLinter.php
+++ b/src/lint/linter/ArcanistCSharpLinter.php
@@ -64,14 +64,6 @@
return parent::setCustomSeverityMap($map);
}
- public function getLintSeverityMap() {
- return array();
- }
-
- public function getLintNameMap() {
- return array();
- }
-
/**
* Determines what executables and lint paths to use. Between platforms
* this also changes whether the lint engine is run under .NET or Mono. It
diff --git a/src/lint/linter/ArcanistCppcheckLinter.php b/src/lint/linter/ArcanistCppcheckLinter.php
--- a/src/lint/linter/ArcanistCppcheckLinter.php
+++ b/src/lint/linter/ArcanistCppcheckLinter.php
@@ -10,10 +10,6 @@
*/
final class ArcanistCppcheckLinter extends ArcanistLinter {
- public function willLintPaths(array $paths) {
- return;
- }
-
public function getLinterName() {
return 'cppcheck';
}
@@ -21,11 +17,9 @@
public function getLintOptions() {
$config = $this->getEngine()->getConfigurationManager();
// You will for sure want some options. The below default tends to be ok
- $options = $config->getConfigFromAnySource(
+ return $config->getConfigFromAnySource(
'lint.cppcheck.options',
'-j2 --inconclusive --enable=performance,style,portability,information');
-
- return $options;
}
public function getLintPath() {
@@ -42,9 +36,7 @@
"globally, you can just remove these keys from your .arcconfig.");
}
- $bin = csprintf("%s/%s", $prefix, $bin);
-
- return $bin;
+ return csprintf("%s/%s", $prefix, $bin);
}
// Look for globally installed cppcheck
diff --git a/src/lint/linter/ArcanistCpplintLinter.php b/src/lint/linter/ArcanistCpplintLinter.php
--- a/src/lint/linter/ArcanistCpplintLinter.php
+++ b/src/lint/linter/ArcanistCpplintLinter.php
@@ -9,19 +9,13 @@
*/
final class ArcanistCpplintLinter extends ArcanistLinter {
- public function willLintPaths(array $paths) {
- return;
- }
-
public function getLinterName() {
return 'cpplint.py';
}
public function getLintOptions() {
$config = $this->getEngine()->getConfigurationManager();
- $options = $config->getConfigFromAnySource('lint.cpplint.options', '');
-
- return $options;
+ return $config->getConfigFromAnySource('lint.cpplint.options', '');
}
public function getLintPath() {
@@ -38,9 +32,7 @@
"globally, you can just remove these keys from your .arcconfig.");
}
- $bin = csprintf("%s/%s", $prefix, $bin);
-
- return $bin;
+ return csprintf("%s/%s", $prefix, $bin);
}
// Look for globally installed cpplint.py
diff --git a/src/lint/linter/ArcanistFlake8Linter.php b/src/lint/linter/ArcanistFlake8Linter.php
--- a/src/lint/linter/ArcanistFlake8Linter.php
+++ b/src/lint/linter/ArcanistFlake8Linter.php
@@ -18,12 +18,8 @@
public function getDefaultFlags() {
// TODO: Deprecated.
-
$config = $this->getEngine()->getConfigurationManager();
-
- $options = $config->getConfigFromAnySource('lint.flake8.options', '');
-
- return $options;
+ return $config->getConfigFromAnySource('lint.flake8.options', '');
}
public function getDefaultBinary() {
diff --git a/src/lint/linter/ArcanistPEP8Linter.php b/src/lint/linter/ArcanistPEP8Linter.php
--- a/src/lint/linter/ArcanistPEP8Linter.php
+++ b/src/lint/linter/ArcanistPEP8Linter.php
@@ -22,15 +22,10 @@
public function getDefaultFlags() {
// TODO: Warn that all of this is deprecated.
-
$config = $this->getEngine()->getConfigurationManager();
- $options = $config->getConfigFromAnySource('lint.pep8.options');
-
- if ($options === null) {
- $options = $this->getConfig('options');
- }
-
- return $options;
+ return $config->getConfigFromAnySource(
+ 'lint.pep8.options',
+ $this->getConfig('options'));
}
public function shouldUseInterpreter() {
diff --git a/src/lint/linter/ArcanistPhpcsLinter.php b/src/lint/linter/ArcanistPhpcsLinter.php
--- a/src/lint/linter/ArcanistPhpcsLinter.php
+++ b/src/lint/linter/ArcanistPhpcsLinter.php
@@ -49,12 +49,7 @@
public function getDefaultBinary() {
// TODO: Deprecation warnings.
$config = $this->getEngine()->getConfigurationManager();
- $bin = $config->getConfigFromAnySource('lint.phpcs.bin');
- if ($bin) {
- return $bin;
- }
-
- return 'phpcs';
+ return $config->getConfigFromAnySource('lint.phpcs.bin', 'phpcs');
}
public function shouldExpectCommandErrors() {
diff --git a/src/lint/linter/ArcanistPhutilLibraryLinter.php b/src/lint/linter/ArcanistPhutilLibraryLinter.php
--- a/src/lint/linter/ArcanistPhutilLibraryLinter.php
+++ b/src/lint/linter/ArcanistPhutilLibraryLinter.php
@@ -28,10 +28,6 @@
return 'PHL';
}
- public function getLintSeverityMap() {
- return array();
- }
-
public function willLintPaths(array $paths) {
if (!xhpast_is_available()) {
throw new Exception(xhpast_get_build_instructions());
diff --git a/src/lint/linter/ArcanistPyFlakesLinter.php b/src/lint/linter/ArcanistPyFlakesLinter.php
--- a/src/lint/linter/ArcanistPyFlakesLinter.php
+++ b/src/lint/linter/ArcanistPyFlakesLinter.php
@@ -7,23 +7,10 @@
*/
final class ArcanistPyFlakesLinter extends ArcanistLinter {
- public function willLintPaths(array $paths) {
- return;
- }
-
public function getLinterName() {
return 'PyFlakes';
}
- public function getLintSeverityMap() {
- return array();
- }
-
- public function getLintNameMap() {
- return array(
- );
- }
-
public function getPyFlakesOptions() {
return null;
}
diff --git a/src/lint/linter/ArcanistPyLintLinter.php b/src/lint/linter/ArcanistPyLintLinter.php
--- a/src/lint/linter/ArcanistPyLintLinter.php
+++ b/src/lint/linter/ArcanistPyLintLinter.php
@@ -187,22 +187,10 @@
return implode(" ", $options);
}
- public function willLintPaths(array $paths) {
- return;
- }
-
public function getLinterName() {
return 'PyLint';
}
- public function getLintSeverityMap() {
- return array();
- }
-
- public function getLintNameMap() {
- return array();
- }
-
public function lintPath($path) {
$pylint_bin = $this->getPyLintPath();
$python_path = $this->getPyLintPythonPath();

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 18, 6:13 PM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6728152
Default Alt Text
D8385.id19921.diff (7 KB)

Event Timeline