Test namespace discovery. Scans test directories for .clj files and reads namespace symbols from ns forms using standard Clojure conventions.
Test namespace discovery. Scans test directories for .clj files and reads namespace symbols from ns forms using standard Clojure conventions.
(discover-clj-files dirs)Returns a vec of {:path <string> :ns-sym <symbol>} for all .clj/.cljc files found recursively under the given directories. Files without an ns form are skipped. Returns an empty vec if a directory does not exist or is empty.
Returns a vec of {:path <string> :ns-sym <symbol>} for all .clj/.cljc files
found recursively under the given directories. Files without an ns form are
skipped. Returns an empty vec if a directory does not exist or is empty.(discover-cljs-files dirs)Returns a vec of {:path <string> :ns-sym <symbol>} for all .cljs/.cljc files found recursively under the given directories. Files without an ns form are skipped. Returns an empty vec if a directory does not exist or is empty.
Returns a vec of {:path <string> :ns-sym <symbol>} for all .cljs/.cljc files
found recursively under the given directories. Files without an ns form are
skipped. Returns an empty vec if a directory does not exist or is empty.(discover-files-for-platform dirs platform)Discovers source files for the given platform (:clj or :cljs). Returns a vec of {:path <string> :ns-sym <symbol>}.
Discovers source files for the given platform (:clj or :cljs).
Returns a vec of {:path <string> :ns-sym <symbol>}.(discover-test-files test-dirs)Returns a seq of {:path <string> :ns-sym <symbol>} for all .clj files found recursively under the given test directories. Files without an ns form are skipped. Returns an empty seq if a directory does not exist or is empty.
Returns a seq of {:path <string> :ns-sym <symbol>} for all .clj files
found recursively under the given test directories. Files without an ns
form are skipped. Returns an empty seq if a directory does not exist or
is empty.(file-path->ns-sym root-dir file-path)Converts a file path relative to a root directory into a Clojure namespace symbol. Applies standard conventions: path separators become dots, underscores become hyphens, .clj/.cljc extension is stripped.
Converts a file path relative to a root directory into a Clojure namespace symbol. Applies standard conventions: path separators become dots, underscores become hyphens, .clj/.cljc extension is stripped.
(read-ns-sym path)Reads the namespace symbol from a Clojure source file by parsing its ns form. Returns nil if the file has no ns form or cannot be read. Supports .cljc reader conditionals via :read-cond :preserve.
Reads the namespace symbol from a Clojure source file by parsing its ns form. Returns nil if the file has no ns form or cannot be read. Supports .cljc reader conditionals via :read-cond :preserve.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |