Take Action to Manage Technical Debt

by g. ann campbell|

    One of the things I love about SonarQube is that gives you tools to tackle all aspects of your technical debt. I am not just talking here about the Seven Axes of Quality / Seven Deadly Developer Sins. No, what I'm talking about is quality along the axis of time.

    Of course SonarQube shows you what's wrong in the present - from the macro level to the micro. It also reaches back to the past to show you where you've come from; start analyzing a new project on day one and you can get a great perspective on how its technical debt has grown (or not) along with its size. But that's not what I want to talk about today. Today, I want to talk about the future, because SonarQube's issues workflow can help you manage today's debt into the future.

    By default, there are seven different things you can do to an issue (other than fixing it in the code!): Comment, Assign, Plan, Confirm, Change Severity, Resolve, and False Positive. Plugins may add more options, such as Link to JIRA.

    In my mind, these actions break out into four different categories, which I'll talk about in what I consider their logical order. First up is the "technical review" category.

    Technical Review

    Confirm, False Positive, and Change Severity fall into this category, which presumes an initial review of an issue to verify its validity. Assume it's time to review the technical debt added in the last review period - whether that's a day, a week, or an entire sprint. You go through each new issue and do one of three things:

    • Confirm - By confirming an issue, you're basically saying "Yep, that's a problem."
    • False positive - Looking at the issue in context, you realize that for whatever reason, this issue isn't actually an issue, erm... "problem." It's not actually a problem. So you mark it False Positive and move on. It will disappear from your issue counts and drilldown after the next analysis.
    • Change severity - This is the middle ground between the first two options. Yes, it's a problem, but it's not as bad a problem as the rule's default severity makes it out to be. Or perhaps it's actually far worse. Either way, you adjust the severity of the issue to bring it in line with what you feel it deserves. The marker in the drilldown will change to show the new severity immediately, but the change won't be reflected in your issue counts until after the next analysis.


    Once issues have been through technical review, it's time to decide how you're going to deal them. You've got up to three choices here, and while the technical review options are mutually exclusive (well, mostly), you may find yourself using all three of these on the same issue:

    • Assign - Assign the issue to yourself or a teammate for immediate handling. The assignee will receive email notification of the assignment if he signed up for notifications, and the assignment will show up everywhere the issue is displayed, as well as in certain widgets.

    • Plan - Some issues will need immediate action, but others you might want to put off. The Action Plan functionality lets you group issues into sets, optionally assign dates, and track set resolution. Once you've created an action plan, the "Plan" option on an issue lets you put the issue into the set.

    • Link to JIRA - Assuming you've installed the JIRA plugin, this option allows you to create a JIRA ticket for an issue. The URL to the JIRA ticket will be added to the issue and a link to the issue will be added to the JIRA ticket. After that though, there's no relationship between the two. Updating the JIRA ticket won't touch the issue and vice versa.


    There's only one option under the General category: comment. At any time during the lifecycle of an issue, you can log a comment on it. Comments are displayed in the issue detail in a running log. You have the ability to edit or delete the comments you made.


    If you've been doing the math, you already know that there's only one option left: Resolve. Use this option to signal that you think you've fixed an open issue. If you're right, the next analysis will move it to closed status. If you're wrong, its status will go to re-opened.

    So that's it. That's how SonarQube lets you manage today's issues into the future: by helping you vet them, organize what to fix now and what to schedule for later, and track them as your Plan comes together.