Skip to content

Commit

Permalink
fix #66: Handle "./" at beginning of :source-paths or :test-paths dir…
Browse files Browse the repository at this point in the history
… names
  • Loading branch information
jafingerhut committed May 13, 2014
1 parent 8f84fc1 commit 96963d9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/eastwood/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,15 @@ exception."))))
:recommended-fname desired-fname,
:recommended-namespace desired-ns}]))))

(defn canonical-filename [fname]
(let [^java.io.File f (if (instance? java.io.File fname)
fname
(java.io.File. ^String fname))]
(.getCanonicalPath f)))

(defn nss-in-dirs [dir-name-strs]
(let [mismatches (filename-namespace-mismatches dir-name-strs)]
(let [dir-name-strs (map canonical-filename dir-name-strs)
mismatches (filename-namespace-mismatches dir-name-strs)]
(when (seq mismatches)
(println "The following file(s) contain ns forms with namespaces that do not correspond
with their file names:")
Expand Down

0 comments on commit 96963d9

Please sign in to comment.