diff --git a/src/lint/linter/ArcanistJSHintLinter.php b/src/lint/linter/ArcanistJSHintLinter.php index ef25346d..1392b5e9 100644 --- a/src/lint/linter/ArcanistJSHintLinter.php +++ b/src/lint/linter/ArcanistJSHintLinter.php @@ -54,6 +54,12 @@ final class ArcanistJSHintLinter extends ArcanistLinter { ); } + // placeholder if/until we get a map code -> name map + // jshint only offers code -> description right now (parsed as 'reason') + public function getLintMessageName($code) { + return "JSHint".$code; + } + public function getLintNameMap() { return array( self::JSHINT_ERROR => "JSHint Error" @@ -163,7 +169,7 @@ final class ArcanistJSHintLinter extends ArcanistLinter { $this->raiseLintAtLine( $err->line, $err->col, - self::JSHINT_ERROR, + $err->code, $err->reason); } } diff --git a/src/lint/linter/reporter.js b/src/lint/linter/reporter.js index b34bd736..768d6393 100644 --- a/src/lint/linter/reporter.js +++ b/src/lint/linter/reporter.js @@ -4,12 +4,12 @@ module.exports = { results.forEach(function (result) { var error = result.error; - report.push({ - 'file': result.file, - 'line': error.line, - 'col': error.character, - 'reason': error.reason + 'file' : result.file, + 'line' : error.line, + 'col' : error.character, + 'reason': error.reason, + 'code' : error.code, }); });