Skip to content

Cyclomatic complexity support

Silvio Montanari edited this page Sep 16, 2019 · 4 revisions

Tasks like complexity trend analysis or hotspot analysis leverage cyclomatic complexity information to complement or build their respective analysis reports. Such information is usually obtained by running specific parsers/tools for any particular programming language.

Those tasks also need be enabled for the desired programming languages via the languages settings.

code-forensics currently has built-in analysers support for JavaScript and Ruby, because those are programming languages that I have been working with quite often in recent years. Support for more languages can of course be added.

JavaScript support

At the moment JavaScript is (obviously) supported out of the box. If you are using cutting edge JavaScript language features you (e.g. ECMAScript 6+, JSX, etc.) you will need to add special settings as described in Advanced setup.

Ruby support

Ruby is also supported, although you are required to install the gem flog, which is used to report cyclomatic complexity on Ruby files. The current version of code-forensics has been tested with flog v4.4.0.

Clone this wiki locally