Analyzes Clojure source code using clj-kondo to build a symbol dependency graph.
Analyzes Clojure source code using clj-kondo to build a symbol dependency graph.
(build-symbol-graph analysis)
Builds a complete symbol graph from clj-kondo analysis.
Returns: {:nodes {symbol -> node-data} :edges [{:from :to :file :line}] :analysis - original analysis for reference}
Builds a complete symbol graph from clj-kondo analysis. Returns: {:nodes {symbol -> node-data} :edges [{:from :to :file :line}] :analysis - original analysis for reference}
Default set of macro symbols that define tests.
Default set of macro symbols that define tests.
(extract-namespace-definitions analysis)
Extracts namespace definitions from clj-kondo analysis.
Extracts namespace definitions from clj-kondo analysis.
(extract-test-metadata var-def)
Extracts test-related metadata from a var definition.
Returns a map with: :test-targets - Set of symbols this test explicitly targets (from metadata) :integration? - True if this appears to be an integration test
Extracts test-related metadata from a var definition. Returns a map with: :test-targets - Set of symbols this test explicitly targets (from metadata) :integration? - True if this appears to be an integration test
(extract-var-definitions analysis)
Extracts var definitions from clj-kondo analysis into our node format.
Extracts var definitions from clj-kondo analysis into our node format.
(extract-var-usages analysis)
Extracts var usage edges from clj-kondo analysis. Returns edges showing which symbols use which other symbols.
Extracts var usage edges from clj-kondo analysis. Returns edges showing which symbols use which other symbols.
(find-macro-tests analysis)
(find-macro-tests analysis test-macros)
Find tests defined by macros like fulcro-spec's specification.
Returns a map of pseudo-test-vars in the same format as regular test vars, using the namespace as the test symbol since macro calls don't create var definitions.
Args: analysis - clj-kondo analysis result test-macros - Set of qualified macro symbols to treat as test definers (defaults to fulcro-spec.core/specification)
Find tests defined by macros like fulcro-spec's specification. Returns a map of pseudo-test-vars in the same format as regular test vars, using the namespace as the test symbol since macro calls don't create var definitions. Args: analysis - clj-kondo analysis result test-macros - Set of qualified macro symbols to treat as test definers (defaults to fulcro-spec.core/specification)
(find-test-vars symbol-graph)
Returns all test vars from the symbol graph.
Returns all test vars from the symbol graph.
(integration-test? ns-symbol)
Returns true if the namespace name suggests an integration test. Matches namespaces containing 'integration' as a segment.
Returns true if the namespace name suggests an integration test. Matches namespaces containing 'integration' as a segment.
(run-analysis {:keys [paths config] :or {paths ["src"]}})
Runs clj-kondo analysis on the specified paths and returns the analysis data.
Options: :paths - Vector of paths to analyze (defaults to ["src"]) :config - Additional clj-kondo config map
Returns a map with: :var-definitions - All defined vars with location info :var-usages - All var usages with caller context :namespace-definitions - Namespace definitions :namespace-usages - Namespace requires/imports
Runs clj-kondo analysis on the specified paths and returns the analysis data. Options: :paths - Vector of paths to analyze (defaults to ["src"]) :config - Additional clj-kondo config map Returns a map with: :var-definitions - All defined vars with location info :var-usages - All var usages with caller context :namespace-definitions - Namespace definitions :namespace-usages - Namespace requires/imports
(test-var? node)
Returns true if the node represents a test var.
Returns true if the node represents a test var.
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 |