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
Not included is "double-clicking policy violation automatically positions cursor on offending element" (I'd need to take a dependency on VS, and quite frankly have no idea how to implement this using VS' object model). Remaining on the todo list is the MSBuild task for calculating code comment coverage, but this will take a while because firstly I am not really that firm with writing MSBuild tasks, and secondly I will have to spend more quality time with IIS7 in the near future.
Without further ado, here are the goods:
Further information: