WalkModHub Tutorial to control and fix technical debt

walkmod
walkmod
Published in
3 min readJan 26, 2017

Here we describe the steps to start using WalkModHub.

  1. Download and run the last WalkModHub Docker compose.
wget -O docker-compose.yml http://tinyurl.com/j23y8g6
docker-compose up

2. Open our browser in localhost or in our Docker machine IP

http://localhost:80

3. Run your first analysis (using PMD) for a Git repository (e.g https://github.com/rpau/test.git), which will give us a repository ID, which will be useful to configure our incremental analysis from the developers machines.

4. Now, the coding style issues will be updated automatically while you are committing. However, you can start analyzing your current hotspots, some productivity metrics, the best developers of each month, the status of your commits or the accumulated technical debt you have and define your own quality gate.

Developers Activity
Technical Debt Evolution
Commits Status
The Most Critical Files to Fix

5. Now, let’s configure PMD to work in incremental mode before commit our changes. Download and install our modified PMD from here. Our next steps will assume that you use the pmd command as an alias for bin/run.sh of this binary distribution.

5. Run pmd from your local copy of your Git repository with the following instruction. Replace ${WH_HOST} for your WalkModHub IP address (e.g localhost) and ${REPO_ID} for your own repository ID.

pmd pmd -d . -f WalkModHub -P host=${WH_HOST} -R http://${WH_HOST}/pmd/${REPO_ID}/master/ruleset.xml

And voilà! If there are no changes to your repository, PMD will not report any new issues. Otherwise, you will only see those that have been produced by your own changes.

For those which are not familiar with the PMD arguments, we are specifying our renderer with the -f (format) parameter. The -P arguments define properties for our render; and in this case, we are defining where the renderer can lookup the last analysis of our repository. Finally, the -R (ruleset) argument specifies the set of rules to take in consideration.

--

--

walkmod
walkmod
Editor for

Open source technology to fix code style issues and reduce technical debt