Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #39 from Arcanemagus/actually-fix
Browse files Browse the repository at this point in the history
Don't make any assumptions about output
  • Loading branch information
Arcanemagus committed Aug 7, 2015
2 parents 4e76f0b + 451ef4f commit 1322397
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions lib/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,21 @@ module.exports =
if lintResult.messages.length < 1
return toReturn
for data in lintResult.messages
if not data.rollup
msg = {}
if not (data.line and data.col)
# Use the file start if location not defined
msg.range = helpers.rangeFromLineNumber(textEditor, 0)
else
line = data.line - 1
col = data.col - 1
else
helpers.rangeFromLineNumber(textEditor, 0)
toReturn.push({
type: data.type.charAt(0).toUpperCase() + data.type.slice(1),
text: data.message,
filePath: filePath
range: [[line, col], [line, col]],
trace: [{
msg.range = [[line, col], [line, col]]
msg.type = data.type.charAt(0).toUpperCase() + data.type.slice(1)
msg.text = data.message
msg.filePath = filePath
if data.rule.id and data.rule.desc
msg.trace = [{
type: "Trace",
text: '[' + data.rule.id + '] ' + data.rule.desc
}]
})
toReturn.push(msg)
return toReturn

0 comments on commit 1322397

Please sign in to comment.