lsegal / complexity
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
commit 7fa0eb8ce126a232b1d7268d01f749df35a32ca9
tree d183641f308a3ba296bcfb6fc4c4a9f4c59c31fa
parent b8fce4522ea207416f9b6e98b44731ca4bd9cd94
tree d183641f308a3ba296bcfb6fc4c4a9f4c59c31fa
parent b8fce4522ea207416f9b6e98b44731ca4bd9cd94
| name | age | message | |
|---|---|---|---|
| |
LICENSE | Sun Sep 06 10:49:12 -0700 2009 | |
| |
README.md | Sun Sep 06 00:43:41 -0700 2009 | |
| |
Rakefile | Sun Sep 06 10:49:12 -0700 2009 | |
| |
bin/ | Sun Sep 06 10:45:09 -0700 2009 | |
| |
complexity.gemspec | Sun Sep 06 10:49:12 -0700 2009 | |
| |
lib/ | Sun Sep 06 11:27:52 -0700 2009 | |
| |
test/ | Sun Sep 06 11:27:52 -0700 2009 |
README.md
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
- Requires YARD
Syntax: ruby complexity.rb [--csv] GLOB_OF_FILES
If you want CSV output, add --csv. GLOB_OF_FILES defaults to lib/**/*.rb.
