Friday, December 29, 2006

Another TFS Checkin Policy - Code Comment Checking Policy

this.Pose() as Expert - Code Comment Checking Policy - Take Two

"Work progressed much faster than I thought, so I can present you today with the next iteration of CCCP, the Code Comment Checking Policy for VSTS / TFS. What is new and improved over yesterday's release:

  • VB.NET code comment verification enabled
  • Code comment statistics tracking implemented, off by default
  • Reference.* excluded (Web Services auto-generated files)
  • Visibility special-casing of class type removed, CodeCommentCheckingVisibility honored
  • Refactoring of CheckCodeComments, CreateInstance added for cleaner construction
  • Unit testing automated and initial tests added
  • Use String.Compare instead of == where potentially case sensitive or culture dependent

This equates to: the policy itself is feature-complete! It now sports the following functionality:

  • Code comment verification for C# and VB.NET using a real parser engine
  • Options to enable verification based on elements (methods, ...) and visibility (public, ...) - note that C# and VB.NET is auto-detected, no need to enable or configure this

...

Further information:

"

This is a cool TFS Checkin Policy.

Personally I feel this demonstrates just how powerful a checkin policy can be. If you can verify code is commented (let's put aside the code comment wars for now) then think about all the other stuff you can do.

The C# source is available too...

Related Past Post XRef:
Team Foundation Server Check-In Policies
"Visual Studio Custom Checkin Policy Template"
TFS Check In Policies, Code to Police Code

No comments: