complexity-report.js

479 views
Skip to first unread message

Phil Booth

unread,
Oct 28, 2012, 8:19:45 AM10/28/12
to js-t...@googlegroups.com
Hi all,

To scratch an itch I've been having on another project, I've started to build a complexity analysis tool on top of Esprima:


It's currently still quite naive, simply tracking cyclomatic complexity as it walks the syntax tree, but work is under way to add Halstead measures and the Maintainability Index.

There is some configuration available to set how complexity is calculated and a threshold may also be set to make the process fail if functions beyond a specified complexity are encountered.

Bug reports, pull requests or just thoughts are extremely welcome! :)

Phil

Ariya Hidayat

unread,
Oct 29, 2012, 9:14:58 AM10/29/12
to js-t...@googlegroups.com
Hi Phil,

complexityReport.js looks really good indeed, thanks for this awesome
tool! I also can't wait to see more metrics being incorporated into
the analyzer.

Now I'm going to try to use it for some projects (including Esprima
itself). I'll report my findings.

Thank you.

Best regards,


--
Ariya Hidayat, http://ariya.ofilabs.com
http://twitter.com/ariyahidayat

Anton Kovalyov

unread,
Oct 29, 2012, 1:26:52 PM10/29/12
to js-t...@googlegroups.com
Looks awesome! We added similar features to JSHint a few weeks ago and they seem to be quite popular so there is definitely a need for such tools.

Anton



Tianhao Li

unread,
Oct 12, 2014, 11:47:37 PM10/12/14
to js-t...@googlegroups.com
Hi Phil,

Do you have any documentation about how this tool can integrate with JSLint plugin for Jenkins?

Thanks.
Reply all
Reply to author
Forward
0 new messages