Liking cljdoc? Tell your friends :D

test-filter.analyzer

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.
raw docstring

build-symbol-graphclj

(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}
sourceraw docstring

default-test-macrosclj

Default set of macro symbols that define tests.

Default set of macro symbols that define tests.
sourceraw docstring

extract-namespace-definitionsclj

(extract-namespace-definitions analysis)

Extracts namespace definitions from clj-kondo analysis.

Extracts namespace definitions from clj-kondo analysis.
sourceraw docstring

extract-test-metadataclj

(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
sourceraw docstring

extract-var-definitionsclj

(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.
sourceraw docstring

extract-var-usagesclj

(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.
sourceraw docstring

find-macro-testsclj

(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)
sourceraw docstring

find-test-varsclj

(find-test-vars symbol-graph)

Returns all test vars from the symbol graph.

Returns all test vars from the symbol graph.
sourceraw docstring

integration-test?clj

(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.
sourceraw docstring

run-analysisclj

(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
sourceraw docstring

test-var?clj

(test-var? node)

Returns true if the node represents a test var.

Returns true if the node represents a test var.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close