views:

45

answers:

3

As part of QA activities I need to make sure that all changes between the last tagged code and the proposed code are commented (At least have references to an issue ID).

Is there a way of doing this instead of manually looking at diffs?

Does anyone has a trick under his/her sleeve?

I want to avoid making Code Review obseervations for coding standards like this one if I can.

In my case I have code in Java (Netbeans) and C++

A: 

If you are using Visual Studio you can use StyleCop (http://code.msdn.microsoft.com/sourceanalysis) for various code styling validations, also it is possible to implement custom rules for it. It is even possible to make code not compiling without proper comments.

Andrew Bezzub
My bad, I forgot to specify I'm using java. I'll update my post.
javydreamercsw
+1  A: 

We are developing in Java, and we use Atlassian JIRA and FishEye with CVS. Whenever we commit something, we add the relevant JIRA task number(s) to the commit message, like

PL-1638
Fixed the formatting bug and also refactored code a bit

JIRA then picks up these item numbers and links the commits to the items, and as it is linked with FishEye, you can even check on the dashboard from your browser, what changes have been committed to which task by whom and when.

We rely on conventions not to forget putting the task numbers into commit messages, and after an initial training period it seems to be working just fine. It is of course eased by the fact that the IDE (IntelliJ in our case) remembers the last commit message, effectively reminding us to fill the actual task number.

Péter Török
I'm aware of JIRA and FishEye capabilities but right now I'm stuck with open source solutions.I have Subversion server and Hudson so far. Any open source equivalent for those?
javydreamercsw
I guess an option is codebeamer MR which is free to use.
javydreamercsw
Finally I'll be in a position with more control to this and we're evaluating Atlassian tools. They have a huge $10 perpetual license offer now!
javydreamercsw
A: 

It sounds like you might be putting comments directly in source code about the issue ID. Please don't do this.

Use good source control (I recommend git), and put the issue ID in your commit message. We use commit message syntax like this:

"Toward #1234. Did some stuff to the thing."

or,

"Fixed #4321. Doohickeys are now functioning correctly."

We then have a post-commit hook which copies the commit message as a comment on the issue in Redmine, our ticket tracker.

It's easy to check the commit log to see who is making commits not related to an issue. You could even use regular expressions for this.

Christian Oudard
javydreamercsw