Kwala

Description: Kwala is a build tool that contains a number of actions to check the “quality” of your ruby source code. Some of the included actions are checks for code duplication, cyclomatic complexity, lines of code, unit tests, various formatting checks, and require cycles. In addition, Kwala is designed to allow users to add and create new actions to check against the code. It generates both an HTML summary page and detail pages for the various actions.

License: BSD

Usage:

Kwala is a command line tool that allows you to specify which actions to run on your project. Because Kwala is a command line tool it is easy to setup as a cron job to perform periodic checks against your code base.

An example for hourly builds:

kwala -p MyProject -d projects/MyProject -o builds -a syntax_check -a formatting -a unit_test -a cyclomatic -a cycles

For more details on how to use it, please see the usage notes by running “kwala -?”“

Install:

As root run # ruby setup.rb all

Dependencies: Kwala uses Amrita 1 to generate the HTML results pages. You can get it from here: amrita.sourceforge.jp/ At the moment Amrita 1 is not available as a RubyGem.

External Tools Used: Some actions use external tools to perform the actual check or present the results. If an action cannot find its required tools, that action will simply not generate any output. For your convenience, we already bundled a few jar files (see in the ext directory) that some actions use. Here is a complete list of the projects from which those tools originate:

PMD’s CPD for code duplication. pmd.sourceforge.net/

Prefuse for require graph visualization. www.prefuse.org/

Saikuro for cyclomatic complexity checks saikuro.rubyforge.org/

rcov for code coverage eigenclass.org/hiki.rb?rcov

MultiRuby for running unit tests against various versions of Ruby. www.zenspider.com/ZSS/Products/ZenTest/

Authors and Contributors: Zev Blut Pierre Baumard Michael Reinsch Paul McMahon