Shipping as part of Visual Studio 2012:
- Builds – Requires that build was successful (CI builds) and therefore build breaks must be fixed before a new check-in.
- Changeset Comments Policy – Requires that user provide comments on check-ins. (new in VS 2012)
- Code Analysis – Requires that Code Analysis is run before check-in. [More]
- Work Items – Requires one or more work items be associated with the check-in.
Note: The Testing Policy that shipped with VS 2010 is not longer available.
Added after installing TFS 2012 Power Tools (needs to be installed an all VS clients):
- Custom Path Policy – Allows you to scope other check-in policies to specific folders or file types. [See here for how to use it.]
- Forbidden Patterns Policy – Prevents users from checking in files with filenames that contain forbidden characters or patterns.
- Work Item Query Policy – Requires that the associated work items need to be part of the result of a specified work item query.
Note: When using an older version of VS (2008/2010) you need to install the corresponding version of the TFS Power Tools (VS 2008 requires 2008 Power Tools, etc.)
Developed by the Community:
- Code Review Checkin Policy – allows to enforce Code Reviews prior to check-in (by Colin Dembovsky). Get it here.
- Checkin Time Tracker v3 – allows you to gather effort values from developers during check-in (by AIT TeamSystemPro Team). Get it here.
- Column Limit Check-in Policy – prevents users from checking in files that don’t comply with your column limit coding style guidelines (by Gambitrex). Get it here.
- Merge / Branch Only Check in Policy – Block check ins that are not part of either a branch or merge operation (by Leon Mayne). Get it here.
Note: When using an older version of VS (2008/2010) you need to install the corresponding version of the check-in policies (for a list of check-in policies for VS 2010, see here).
What about the "Override Warnings" link?
- Set up Policy Override Email Alerts (Post by Martin Woodward)
- Monitor via the TFS Warehouse SQL database (via Colin Dembovsky)
- Create a Report in Excel using the SQL OLAP cube (German with English screenshots)
How can I deploy custom Check-In Policies to all team members?
- Distribute Custom Check-In Policies using TFS Power Tools (via Ricci Gian Maria)
- Deploy custom Check-in Policies using a VSIX package (via Terje Sandstorm)
How can I create custom Check-In Policies?:
- How to: Implement, package and deploy custom check-in policy for TFS 2010 (Jim Lamb)
- How to write custom check-in policies (Brian A. Randell, MSDN Magazin, Nov 2007)
Do you know another great check-in policy for TFS 2012? Let me know!
Updated (May 17th, 2013): Added Merge / Branch Only Check in Policy.