Frage

Let's say original documentation for a class looks like this:

/**
 * My custom class
 *
 * This class helps you do stuff.  It's really great.
 *
 * @author  David Smith
 * @version 1.0
 */
  1. If I come along and rework 50% of the code, how do I document that I made significant contributions?

  2. What is the best way to add a date? e.g. When the code was last modified, when I made my updates, or when the version was updated.

War es hilfreich?

Lösung 2

I'm aware I'm not really answering your question, but I wonder why you're using @author at all.

For tracking changes to code (who created a file? who changed it?), use your version control system. That's what it's for, after all :)

Andere Tipps

One way I've seen in the companies I've worked for over the years is to do this

 /**
 * My custom class
 *
 * This class helps you do stuff.  It's really great.
 *
 * @author  David Smith
 * @version 1.0
 *
 * @modifier Rahul Parkar
 * @modifiedDate 09/11/2012
 */

Also, I've seen them use 2 methods to document changes, one is to use something like Git where each commit has a commit message, the other is to use another Doc tag to document changes.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top