     buffer = editor.getBuffer()
     bufferSavedSubscription = buffer.onDidSave =>
       buffer.transact =>
-        if atom.config.get('rubocop-auto-correct.autoRun')
-          @run(editor)
+        @run(editor) if atom.config.get('rubocop-auto-correct.autoRun')
 
     editorDestroyedSubscription = editor.onDidDestroy ->
       bufferSavedSubscription.dispose()


    if (data.stderr)
      atom.notifications.addError(data.stderr) if notification
    else if (data.summary.offense_count == 0)
      if !onlyFixesNotification
        atom.notifications.addSuccess("No offenses found") if notification
    else
      if !onlyFixesNotification
        atom.notifications.addWarning(
          "#{data.summary.offense_count} offenses found!"
        ) if notification
      for file in data.files
        for offense in file.offenses
          if offense.corrected
            atom.notifications.addSuccess(
              "Line: #{offense.location.line},
              Col:#{offense.location.column} (FIXED)",
              { detail: "#{offense.message}" }
            ) if notification
          else
            if !onlyFixesNotification
              atom.notifications.addWarning(
                "Line: #{offense.location.line},
                Col:#{offense.location.column}",
                { detail: "#{offense.message}" }
              ) if notification

  makeTempFile: (filename) ->
    directory = temp.mkdirSync()

    atom.notifications.addSuccess(@toggleMessage("Debug Mode", !setting))

  run: (editor) ->
    return if !editor
    unless editor.getGrammar().scopeName.match("ruby")
      return atom.notifications.addError("Only use source.ruby")
    if atom.config.get('rubocop-auto-correct.correctFile')
      editor.save() if editor.isModified()
      @autoCorrectFile(editor)
    else
      @autoCorrectBuffer(editor)

  rubocopConfigPath: (filePath) ->
    configFile = '/.rubocop.yml'
    [projectPath, relativePath] = atom.project.relativizePath(filePath)
    projectConfigPath = projectPath + configFile
    homeConfigPath = fs.getHomeDirectory() + configFile
    return ['--config', projectConfigPath] if (fs.existsSync(projectConfigPath))
    retrun ['--config', homeConfigPath] if (fs.existsSync(homeConfigPath))
    []

  rubocopCommand: ->
    commandWithArgs = atom.config.get('rubocop-auto-correct.rubocopCommandPath')
