Comments - Do you enforce comments with check-ins?

Updated by Brady Stroud [SSW] 1 year ago. See history

123

Team Foundation Server is great, and one of its neat features is enforcing comments when checking in code. Without comments, some of the other built in features like History become redundant without comments.

You should have good comments... if you are struggling use Excuses For Lazy Coders :)

Image

❌ Figure: Bad Example: No Comments against the check-ins we don’t know what changes were made in each revision

Image

✅ Figure: Good Example: Now we can pin point which revision a particular change has been made

In Visual Studio 2013, to enforce this behaviour, you will need to:

Image

Figure: Go to Team Explorer | Source Control

Image

Figure: Then Check-in Policy | Add

Image

Figure: Then select Changeset Comments Policy and OK

Image

Figure: Now you have the Changeset Comments Policy applied to your Team Project

Now the next time someone checks-in some code, they are forced to enter a comment.

acknowledgements
related rules