RaoH / linter-erlang

Atom.io erlang linter
MIT License
2 stars 7 forks source link

Error if 'deps' directory not exists in project #7

Closed prokopiy closed 9 years ago

prokopiy commented 9 years ago

This code in init.coffee fix it:

      # universal slash in linux and windows os:
      findDirSlash = (text) ->
        if text.indexOf("/") > 0
          "/"
        else
          "\\"
      ds = findDirSlash(project_path.toString())

      if fs.exists project_path.toString() + ds + "deps" + ds
        fs.readdirSync(project_path.toString() + ds+"deps"+ds).filter(
          (item) ->
            project_deps_ebin += " " + project_path.toString() + ds+"deps"+ds + item + ds+"ebin"
        )
      paPaths = project_deps_ebin.replace(/(\r\n|\n|\r|\s)/gm,"");

      # fs.readdirSync(project_path.toString() + "/deps/").filter(
      #   (item) ->
      #     project_deps_ebin = project_deps_ebin + " ./deps/" + item + "/ebin/"
      # )