       options: {cwd: path.dirname originFileName}
 
 
-  lintFile: (lintInfo, callback) ->
+  lintFile: (lintInfo, textEditor, callback) ->
     results = []
     stdout = (data) ->
       console.log data if do atom.inDevMode

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


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