Skip to content

Commit 16f7a9e

Browse files
committed
Merge pull request #8 from codeclimate/gd-fatal-check
Set the check name when there is a fatal error
2 parents 5e2eed4 + b94d5c0 commit 16f7a9e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bin/eslint

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@
33
var CLIEngine = require("eslint").CLIEngine;
44

55
function buildIssueJson(message, path) {
6+
// ESLint doesn't emit a ruleId in the
7+
// case of a fatal error (such as an invalid
8+
// token)
9+
var checkName = message.ruleId;
10+
if(message.fatal) {
11+
checkName = "fatal"
12+
}
13+
614
var issue = {
715
type: "issue",
816
categories: ["Style"],
9-
check_name: message.ruleId,
17+
check_name: checkName,
1018
description: message.message,
1119
location: {
1220
path: path,

0 commit comments

Comments
 (0)