How to calculate the cyclic complexity of a Clojure function?

What would be a smart way to calculate the cyclic complexity of a Clojure function? It's easy to count decision points based on features like if and cond, but it starts to get complicated with macros. Has anyone tried this for Clojure or perhaps another functional language?

+3
source share
1 answer

Macros are an abstraction and should not contribute to the calculation of CC, no more than a function call.

However, I don't think CC is particularly interesting for Clojure. I would be more interested in what measured the excessive use of volatility.

+4

Source: https://habr.com/ru/post/1015585/


All Articles