0.1.9 • Published 7 years ago

lizard-wrapper v0.1.9

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Lizard wrapper

A Node.js wrapper for Lizard, a code complexity analyser.

Requirements

pip install lizard

Installation

npm install lizard-wrapper

Usage

Sample code

const lizard = require('lizard-wrapper');

var result = lizard.analyzeFile('fizzbuzz.cpp');
var s = JSON.stringify(result);
console.log(s);

You can also use source code string instead of file.

var result = lizard.analyzeSourceCode('foo.cpp', 'int foo(){}');

Sample output

{"filename":"fizzbuzz.cpp","nloc":15,"function_list":[{"cyclomatic_complexity":6,"nloc":13,"token_co
unt":89,"name":"main","long_name":"main()","start_line":3,"end_line":15,"parameters":[],"filename":"
fizzbuzz.cpp","top_nesting_level":0,"length":13,"fan_in":0,"fan_out":0,"general_fan_out":0}],"token_
count":96}

Licence

MIT License

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago