HOWTO: Install Krazy on Ubuntu

Here are some quick steps to install Krazy, the KDE static analysis tool (code checker in more accessible language) on your local machine:

  1. sudo aptitude install libtie-ixhash-perl libhtml-parser-perl libfile-find-rule-perl

    These are the Perl dependencies of Krazy. It won’t install without them.

  2. Download the code in a new directory:

    svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdesdk/ebn/krazy/

  3. Change into the directory and start the installation. You may choose the directory Krazy should be installed to, the default is /usr/local/Krazy/. I chose a location in my home directory: ~/krazy/

    cd krazy
    ./install.sh ~/krazy/

  4. To make your environment aware of where the scripts are, adjust your path (in ~/.bashrc):

    PATH=/home/exit/kde4-devel/krazy/bin:$PATH

    Make sure you indicated the right directory.

  5. That’s it! Log-out, log-in to update the PATH and type krazy --list. You should get a list of checks that are available.

Now, to check a single source file, type krazy filename. To check a whole bunch of them, use krazyall. Enjoy 8)

Comments are closed.

%d bloggers like this: