Project

complexity

0.0
No commit activity in last 3 years
No release in over 3 years
Calculates
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

Complexity

Written by Loren Segal in 2009

SYNOPSIS

Calculates the McCabe cyclomatic complexity index of the methods in your Ruby code. The calculation is a basic NUMBER_OF_BRANCHES + 1 calculation which can be used this calculation to approximate the minimum number of test cases for each of your methods (complexity should equal number of test cases). You can also use this value to find overly complex method and refactor them into simpler ones.

Some more reading can be found at http://www.linuxjournal.com/article/8035.

USAGE

Syntax: ruby complexity.rb [--csv] GLOB_OF_FILES

If you want CSV output, add --csv. GLOB_OF_FILES defaults to lib/**/*.rb.