Is a code review which uses only code comments a good idea?

Posted by gaRex on Programmers See other posts from Programmers or by gaRex
Published on 2012-10-04T01:29:31Z Indexed on 2012/10/04 9:49 UTC
Read the original article Hit count: 482

Filed under:
|
|
|

Preconditions

  • Team uses DVCS
  • IDE supports comments parsing (like TODO and etc.)
  • Tools like CodeCollaborator are expensive for budget
  • Tools like gerrit are too complex for install or not usable

Workflow

  • Author publishes somewhere on central repo feature branch
  • Reviewer fetch it and start review
  • In case of some question/issue reviewer create comment with special label, like "REV". Such label MUST not be in production code -- only on review stage:

    $somevar = 123;
    // REV Why do echo this here?
    echo $somevar;
    
  • When reviewer finish post comments -- it just commits with stupid message "comments" and pushes back

  • Author pulls feature branch back and answer comments in similar way or improve code and push it back
  • When "REV" comments have gone we can think, that review has successfully finished.
  • Author interactively rebases feature branch, squashes it to remove those "comment" commits and now is ready to merge feature to develop or make any action that usualy could be after successful internal review

IDE support

I know, that custom comment tags are possible in eclipse & netbeans. Sure it also should be in blablaStorm family.

Example of custom filtered task-from-comments in eclipse

Questions

  1. Do you think this methodology is viable?
  2. Do you know something similar?
  3. What can be improved in it?

© Programmers or respective owner

Related posts about teamwork

Related posts about code-reviews