Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
lib
spec
.gitignore
README
Rakefile
VERSION
metric_abc.gemspec

README

Metric ABC
==========

This little tool calculates ABC metric for your Ruby code. Requires Ruby 1.9 but should work more or less with sources compatible with 1.9 and 1.8.

Installation
============

$ gem install metric_abc

Usage
=====

    $ metric_abc filename1 [filename2] ...

Understanding output
====================

Output from metric_abc is in form of:

    /path/to/file.rb#Module1#Module2#ClassName#method_name: SCORE

where SCORE is a number. The higher SCORE is, the more crazy code is. If a method scores above 20, it very likely needs some refactoring because it's complete shit.

TODO:
=====

- method is not always properly recognized, sometimes it's full of shit like #@const#1#5#@const etc. Need to look at AST to figure out what's wrong

Something went wrong with that request. Please try again.