2

Sorry for a "my google skills suck" question...

I'm writing a utility that calculates trends for a project to see if we meet coding standards and if we improve over time. As a learning experience I'd like to add support for Clojure. But before I invent any wheels, are there any existing libraries that can answers questions like:

  • what namespaces do the file depend on
  • number of lines used in a function
  • number of function calls in function

or do I have to write it myself?

2
  • take a look at github.com/aphyr/meitner I think number of lines will be tricky. Commented Jan 1, 2014 at 16:45
  • For LISPs, I would try using AST depth instead of the number of lines. Commented Jan 2, 2014 at 5:15

1 Answer 1

3

The Clojure Toolbox lists kibit under Code Analysis. I haven't tried it myself, but it seems like it can scan Clojure code to find certain patterns of bad usage, and it allows you to create your own patterns.

If nothing works and find yourself forced to implement it yourself, you can at least use EDN to parse the Clojure source code into something you can use more easily.

As a sidenote - Clojure is a lisp, so checking for "number of lines used in a function" and "number of function calls in function" makes very little sense.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.