Hacker News new | ask | show | jobs
by mercuryrising 4615 days ago
For JScomplexity, you should round your complexity values :).

Halstead difficulty: 4.666666666666666 Halstead volume: 55.506595772116384 Halstead effort: 259.0307802698764

Do you do storage on the back end? Can you target a particular open source project to analyze it? Can you target languages other than JS?

Make a Github bot that makes pull requests that analyze a project's complexity, areas where it's more complex (refactor), areas where there's fluff, projects that don't follow 'standards'. That'd be cool if it was an opt-in thing, like I add a "ComplexityBot.MD" blank text file, complexity bot comes by, analyzes my project, pull requests the complexitybot.MD file, gives me some nice data, comes by again whenever it gets some down time and updates the analysis.

1 comments

Yeah I should, you're right. I'm working through a huge to-do list on that and CoffeeComplexity right now, but I'll add that on the pile too. :)

There is no storage on the back-end, it just calls a little node library that I wrote and spits out the result.

The work to target other languages is underway, I've split out the AST walking to a separate repo, so it just requires writing a walker implementation for the target parser and you're done. The CoffeeScriptRedux walker is currently in development, with LiveScript planned for after that.

So I met a guy recently who is building something similar to the ComplexityBot idea you describe. It's called sidekick and looks pretty awesome from my initial play around with it.

* https://www.sidekickjs.com/