       ret =
         type: "Warning"
         text: reResult[3]
-        filePath: projectPath() + '/' + reResult[1]
+        filePath: projectPath(textEditor) + '/' + reResult[1]
         range: helpers.rangeFromLineNumber(textEditor, reResult[2] - 1)
     handleResult = (textEditor) ->
       (compileResult) ->

    os = require 'os'
    fs = require 'fs'
    path = require 'path'
    projectPath = ->
      atom.project.getPaths()[0]
    isMixProject = ->
      fs.existsSync(projectPath() + '/mix.exs')
    isTestFile = (textEditor) ->
      relativePath = path.relative(projectPath(), textEditor.getPath())
      relativePath.split(path.sep)[0] == 'test'
    isForcedElixirc = =>
      @forceElixirc

    getFilePathDir = (textEditor) ->
      filePath = textEditor.getPath()
      path.dirname(filePath)
    getOpts = (textEditor) ->
      opts =
        cwd: projectPath(textEditor)
        throwOnStdErr: false
        stream: 'both'
    getDepsPa = (textEditor) ->
      env = if isTestFile(textEditor) then "test" else "dev"
      buildDir = path.join("_build", env, "lib")
      fs.readdirSync(path.join(projectPath(textEditor), buildDir)).map (item) ->
        path.join(projectPath(textEditor), buildDir, item, "ebin")
    lintElixirc = (textEditor) =>
      elixircArgs = [
        "--ignore-module-conflict", "--app", "mix", "--app", "ex_unit", "-o", os.tmpDir(),
      ]
      elixircArgs.push "-pa", item for item in getDepsPa(textEditor)
      elixircArgs.push textEditor.getPath()
      helpers.exec(@elixircPath, elixircArgs, getOpts(textEditor))
        .then(handleResult(textEditor))
    lintMix = (textEditor) =>
      helpers.exec(@mixPath, ['compile'], getOpts(textEditor))
        .then (handleResult(textEditor))

    provider =
