Summary:
makes jshint slightly more useful by printing out error numbers. I love memorizing numbers.
Sorry about the crappy getLintMessageName(). There was no list of error names, just the long descriptions that are already rendered as 'reason'.
Test Plan: Verify that the numbers are mezmorizing. Been tested on OSX with jshint v2.1.11
Reviewers: epriestley
Reviewed By: epriestley
CC: Korvin, aran
Differential Revision: https://secure.phabricator.com/D7213
);
}
+ // 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"
$this->raiseLintAtLine(
$err->line,
$err->col,
- self::JSHINT_ERROR,
+ $err->code,
$err->reason);
}
}
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,
});
});