diff --git a/src/lint/linter/ArcanistCSSLintLinter.php b/src/lint/linter/ArcanistCSSLintLinter.php index 78fcbe25..0eb1f0b8 100644 --- a/src/lint/linter/ArcanistCSSLintLinter.php +++ b/src/lint/linter/ArcanistCSSLintLinter.php @@ -5,6 +5,19 @@ */ final class ArcanistCSSLintLinter extends ArcanistExternalLinter { + public function getInfoName() { + return 'CSSLint'; + } + + public function getInfoURI() { + return 'http://csslint.net'; + } + + public function getInfoDescription() { + return pht( + 'Use `csslint` to detect issues with CSS source files.'); + } + public function getLinterName() { return 'CSSLint'; } diff --git a/src/lint/linter/ArcanistFilenameLinter.php b/src/lint/linter/ArcanistFilenameLinter.php index 63de545c..40d63250 100644 --- a/src/lint/linter/ArcanistFilenameLinter.php +++ b/src/lint/linter/ArcanistFilenameLinter.php @@ -2,13 +2,21 @@ /** * Stifles creativity in choosing imaginative file names. - * - * @group linter */ final class ArcanistFilenameLinter extends ArcanistLinter { const LINT_BAD_FILENAME = 1; + public function getInfoName() { + return pht('Filename'); + } + + public function getInfoDescription() { + return pht( + 'Stifles developer creativity by requiring files have uninspired names '. + 'containing only letters, numbers, period, hyphen and underscore.'); + } + public function getLinterName() { return 'NAME'; } diff --git a/src/lint/linter/ArcanistFlake8Linter.php b/src/lint/linter/ArcanistFlake8Linter.php index 3fc905c3..cfac19c7 100644 --- a/src/lint/linter/ArcanistFlake8Linter.php +++ b/src/lint/linter/ArcanistFlake8Linter.php @@ -3,11 +3,23 @@ /** * Uses "flake8" to detect various errors in Python code. * Requires version 1.7.0 or newer of flake8. - * - * @group linter */ final class ArcanistFlake8Linter extends ArcanistExternalLinter { + public function getInfoName() { + return 'Flake8'; + } + + public function getInfoURI() { + return 'https://pypi.python.org/pypi/flake8'; + } + + public function getInfoDescription() { + return pht( + 'Uses `flake8` to run several linters (PyFlakes, pep8, and a McCabe '. + 'complexity checker) on Python source files.'); + } + public function getLinterName() { return 'flake8'; } diff --git a/src/lint/linter/ArcanistGeneratedLinter.php b/src/lint/linter/ArcanistGeneratedLinter.php index 6efdfb15..7cf90450 100644 --- a/src/lint/linter/ArcanistGeneratedLinter.php +++ b/src/lint/linter/ArcanistGeneratedLinter.php @@ -2,11 +2,20 @@ /** * Stops other linters from running on generated code. - * - * @group linter */ final class ArcanistGeneratedLinter extends ArcanistLinter { + public function getInfoName() { + return pht('Generated Code'); + } + + public function getInfoDescription() { + return pht( + 'Disables lint for files that are marked as "%s", indicating that they '. + 'contain generated code.', + '@'.'generated'); + } + public function getLinterName() { return 'GEN'; } diff --git a/src/lint/linter/ArcanistJSHintLinter.php b/src/lint/linter/ArcanistJSHintLinter.php index 3c241517..ef6ec9db 100644 --- a/src/lint/linter/ArcanistJSHintLinter.php +++ b/src/lint/linter/ArcanistJSHintLinter.php @@ -2,11 +2,22 @@ /** * Uses JSHint to detect errors and potential problems in JavaScript code. - * - * @group linter */ final class ArcanistJSHintLinter extends ArcanistExternalLinter { + public function getInfoName() { + return 'JSHint'; + } + + public function getInfoURI() { + return 'http://www.jshint.com'; + } + + public function getInfoDescription() { + return pht( + 'Use `jshint` to detect issues with Javascript source files.'); + } + public function getLinterName() { return 'JSHint'; } diff --git a/src/lint/linter/ArcanistJSONLintLinter.php b/src/lint/linter/ArcanistJSONLintLinter.php index 60276e0c..fd49b89c 100644 --- a/src/lint/linter/ArcanistJSONLintLinter.php +++ b/src/lint/linter/ArcanistJSONLintLinter.php @@ -4,6 +4,19 @@ * A linter for JSON files. */ final class ArcanistJSONLintLinter extends ArcanistExternalLinter { + + public function getInfoName() { + return 'JSON Lint'; + } + + public function getInfoURI() { + return 'https://github.com/zaach/jsonlint'; + } + + public function getInfoDescription() { + return pht('Use `jsonlint` to detect syntax errors in JSON files.'); + } + public function getLinterName() { return 'JSON'; } diff --git a/src/lint/linter/ArcanistLesscLinter.php b/src/lint/linter/ArcanistLesscLinter.php index 9b25f9c8..1315e371 100644 --- a/src/lint/linter/ArcanistLesscLinter.php +++ b/src/lint/linter/ArcanistLesscLinter.php @@ -16,6 +16,20 @@ final class ArcanistLesscLinter extends ArcanistExternalLinter { const LINT_PARSE_ERROR = 6; const LINT_SYNTAX_ERROR = 7; + public function getInfoName() { + return pht('Less'); + } + + public function getInfoURI() { + return 'https://lesscss.org/'; + } + + public function getInfoDescription() { + return pht( + 'Use the `--lint` mode provided by `lessc` to detect errors in Less '. + 'source files.'); + } + public function getLinterName() { return 'LESSC'; } diff --git a/src/lint/linter/ArcanistMergeConflictLinter.php b/src/lint/linter/ArcanistMergeConflictLinter.php index 1b4d8d68..8144bd18 100644 --- a/src/lint/linter/ArcanistMergeConflictLinter.php +++ b/src/lint/linter/ArcanistMergeConflictLinter.php @@ -2,12 +2,21 @@ /** * Checks files for unresolved merge conflicts. - * - * @group linter */ final class ArcanistMergeConflictLinter extends ArcanistLinter { + const LINT_MERGECONFLICT = 1; + public function getInfoName() { + return pht('Merge Conflicts'); + } + + public function getInfoDescription() { + return pht( + 'Raises errors on unresolved merge conflicts in source files, to catch '. + 'mistakes where a conflicted file is accidentally marked as resolved.'); + } + public function getLinterName() { return 'MERGECONFLICT'; } @@ -31,7 +40,7 @@ final class ArcanistMergeConflictLinter extends ArcanistLinter { $lineno + 1, 0, self::LINT_MERGECONFLICT, - 'This syntax indicates there is an unresolved merge conflict.'); + pht('This syntax indicates there is an unresolved merge conflict.')); } } } @@ -44,7 +53,7 @@ final class ArcanistMergeConflictLinter extends ArcanistLinter { public function getLintNameMap() { return array( - self::LINT_MERGECONFLICT => 'Unresolved merge conflict', + self::LINT_MERGECONFLICT => pht('Unresolved merge conflict'), ); } } diff --git a/src/lint/linter/ArcanistPuppetLintLinter.php b/src/lint/linter/ArcanistPuppetLintLinter.php index 7dab3ed7..74f6458b 100644 --- a/src/lint/linter/ArcanistPuppetLintLinter.php +++ b/src/lint/linter/ArcanistPuppetLintLinter.php @@ -5,6 +5,20 @@ */ final class ArcanistPuppetLintLinter extends ArcanistExternalLinter { + public function getInfoURI() { + return 'http://puppet-lint.com/'; + } + + public function getInfoName() { + return pht('puppet-lint'); + } + + public function getInfoDescription() { + return pht( + 'Use `puppet-lint` to check that your Puppet manifests conform to '. + 'the style guide.'); + } + public function getLinterName() { return 'PUPPETLINT'; } diff --git a/src/lint/linter/ArcanistPyFlakesLinter.php b/src/lint/linter/ArcanistPyFlakesLinter.php index 6ca517cb..7617bf16 100644 --- a/src/lint/linter/ArcanistPyFlakesLinter.php +++ b/src/lint/linter/ArcanistPyFlakesLinter.php @@ -2,11 +2,23 @@ /** * Uses "PyFlakes" to detect various errors in Python code. - * - * @group linter */ final class ArcanistPyFlakesLinter extends ArcanistExternalLinter { + public function getInfoURI() { + return 'https://pypi.python.org/pypi/pyflakes'; + } + + public function getInfoName() { + return pht('PyFlakes'); + } + + public function getInfoDescription() { + return pht( + 'PyFlakes is a simple program which checks Python source files for '. + 'errors.'); + } + public function getLinterName() { return 'PYFLAKES'; } diff --git a/src/lint/linter/ArcanistRubyLinter.php b/src/lint/linter/ArcanistRubyLinter.php index 15ba1b72..739585d5 100644 --- a/src/lint/linter/ArcanistRubyLinter.php +++ b/src/lint/linter/ArcanistRubyLinter.php @@ -2,11 +2,21 @@ /** * Uses `ruby` to detect various errors in Ruby code. - * - * @group linter */ final class ArcanistRubyLinter extends ArcanistExternalLinter { + public function getInfoURI() { + return 'https://www.ruby-lang.org/'; + } + + public function getInfoName() { + return pht('Ruby'); + } + + public function getInfoDescription() { + return pht('Use `ruby` to check for syntax errors in Ruby source files.'); + } + public function getLinterName() { return 'RUBY'; } diff --git a/src/lint/linter/ArcanistScriptAndRegexLinter.php b/src/lint/linter/ArcanistScriptAndRegexLinter.php index 978b32f2..da4ebe11 100644 --- a/src/lint/linter/ArcanistScriptAndRegexLinter.php +++ b/src/lint/linter/ArcanistScriptAndRegexLinter.php @@ -160,6 +160,17 @@ final class ArcanistScriptAndRegexLinter extends ArcanistLinter { private $output = array(); + public function getInfoName() { + return pht('Script and Regex'); + } + + public function getInfoDescription() { + return pht( + 'Run an external script, then parse its output with a regular '. + 'expression. This is a generic binding that can be used to '. + 'run custom lint scripts.'); + } + /* -( Linting )------------------------------------------------------------ */