Skip to content

v0.4.0

Choose a tag to compare

@richardwooding richardwooding released this 27 Jun 13:39

Adds treesitter.MetricsFromTree(language, tree, lang, spans) — compute cyclomatic + cognitive complexity over an already-parsed gotreesitter tree, with no second parse. Lets a symbol extractor (e.g. treesitter-symbols) return symbols and metrics from a single parse. Parse now delegates to it; the decision query is compiled+cached per grammar. Exported Span type carries the function ranges the call needs.

go get github.com/richardwooding/go-codemetrics@v0.4.0