Skip to content

Commit

Permalink
Fix duplicate namespaces
Browse files Browse the repository at this point in the history
Author: @martinklepsch

When there are multiple files (e.g. .clj and .cljc) for a namespace
Codox would analyse those namespaces twice returning the analysis
result twice as well.

cljdoc@3f2ea84
cljdoc/cljdoc#155
  • Loading branch information
martinklepsch authored and ptaoussanis committed Jul 5, 2023
1 parent ebfece3 commit 492837f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codox/src/codox/reader/clojure.clj
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@

(defn- find-namespaces [file]
(cond
(.isDirectory file) (ns/find-namespaces-in-dir file)
(jar-file? file) (ns/find-namespaces-in-jarfile (JarFile. file))))
(.isDirectory file) (set (ns/find-namespaces-in-dir file))
(jar-file? file) (set (ns/find-namespaces-in-jarfile (JarFile. file)))))

(defn read-namespaces
"Read Clojure namespaces from a set of source directories (defaults
Expand Down

0 comments on commit 492837f

Please sign in to comment.