         detail: "#{error.message}"
         dismissable: true
       handle()
-      callback([])
+      callback []
 
 
   lintOnFly: (textEditor) =>
     console.log 'lintOnFly'
     return new Promise (resolve, reject) =>
-      results = []
-
-      file = do textEditor.getPath
       tmpOptions = {
         prefix: 'AtomLinter'
-        suffix: "_#{path.basename file}"
+        suffix: "_#{path.basename do textEditor.getPath}"
       }
 
       temp.open(tmpOptions, (err, info) =>

        fs.close(info.fd, (err) =>
          return reject(err) if err

          curDir = path.dirname file
          cmd = @cmd[0..]
          console.log cmd
          cmd.push info.path
          command = cmd[0]
          options = {cwd: curDir}
          args = cmd.slice 1
          console.log cmd

          lintInfo =
            command: command
            args: args
            options: options
            curDir: curDir
            origFileName: file
          @lintFile lintInfo, (results) ->
            fs.unlink(info.path)
            resolve(results)

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

