code.doc.collect.reference

*doc-toplevel-forms*

dynamic

toplevel forms indexed when analysing sources for documentation

aggregate-imports

added in 4.1

(aggregate-imports lookup ns)

finds vars imported into an aggregate namespace via module/include, intern-in and intern-all forms, returning {:namespaces #{...} :vars {...}}

(-> (aggregate-imports (project/file-lookup (project/project)) ’std.block) :namespaces (contains? ’std.block.base)) => true

collect-references

added in 3.0

(collect-references {:keys [articles project], :as interim} name)

find-import-namespaces

added in 3.0

(find-import-namespaces lookup ns)

finds namespaces imported via module/include, intern-in and intern-all

(find-import-namespaces (project/file-lookup (project/project)) ’code.test) => ’(code.test.base.context code.test.checker.collection code.test.checker.common code.test.checker.logic code.test.compile code.test.manage code.test.task)

imported-namespaces

added in 4.1

(imported-namespaces lookup namespaces)

returns all namespaces transitively imported by the given namespaces

ns-form-aliases

added in 4.1

(ns-form-aliases ns-form)

returns the alias -> namespace map for a namespace form

(ns-form-aliases ’(ns example (:require std.block.base :as base [std.string case :as c]))) => ’{base std.block.base, c std.string.case}

reference-namespaces

added in 3.0

(reference-namespaces references lookup namespaces)

finds the referenced vars in the namespace

(-> (reference-namespaces {} (project/file-lookup (project/project)) ’jvm.artifact.common) (get ’jvm.artifact.common) keys sort) => ’(java-class-path java-home java-runtime-jar local-repo sep resource-entry resource-entry-symbol)