         fs.write tmpInfo.fd, do textEditor.getText, (err) =>
           return reject(err) if err
           lintInfo = @makeLintInfo tmpInfo.path, filePath
-          @lintFile lintInfo, (results) ->
+          @lintFile lintInfo, textEditor, (results) ->
             fs.unlink tmpInfo.path
             resolve results
 

          "Error"
        else if match.warning
          "Warning"
        messages.push {
          type: type or 'Warning'
          text: match.message
          filePath: lintInfo.fileName
          range: [
            [match.line - 1, 0]
            [match.line - 1, 0]
          ]
        }
      callback(messages)

  lintOnSave: (textEditor) =>
    return new Promise (resolve, reject) =>
      lintInfo = @makeLintInfo do textEditor.getPath
      @lintFile lintInfo, textEditor, (results) ->
        resolve(results)


