It is rather a discussion question, which is not the type of question that StackOverflow usually requires, but I will bite.
Policies that make sense to me:
- Builds politics
- This policy prevents the queue of failed builds after someone breaks the build. In fact, you will be warned that the assembly is currently broken, so that someone can fix the assembly before continuing.
- Work Item Association
- We need a work item association so that we can track the validation operations performed by validations.
- Work item Request
- We want people to choose their work from the current sprint / iteration. Thus, it is convenient to verify that working people are actually checking this; it is a pre-approved work.
- User path policy
- We use this policy from time to time in Team projects that contain more than one project and where we want to improve quality or security in one project, but are not interested in disturbing another project. Or to prevent certain checks in the current release branch, but do not want such strict policies to be retained in the old version.
We test a few things you could do with test policies, instead, instead of building CI. This is mainly done to save time on the machines of developers.
- Code Analysis Policy.
- Instead of using a validation policy for this, we use a CI assembly that will fail if certain code analysis rules are violated. This allows us to let the developer create skip Code Analysis for each assembly. People will learn very quickly how to prevent these rules from starting in any case.
We do not use any other policies. Requiring a comment for a change set policy is something we sometimes use, but most teams don't really need a policy for this after a while. The absence of comments on the verification is not approved by the majority, and this is resolved by myself.
We had several projects in which time tracking was performed (for MSM CMMI), and we used a custom policy so that people would update their watches with each control .
We do not use any policy to ensure code coverage or the number of warnings. They can be added to the assembly, if necessary, by customizing the assembly process.
We use Gated Checkins for branches that require additional verification. Such as release branches and branches followed by automatic deployment.
We often allow developers to circumvent any validation policy without penalty. The same goes for closed checks. Of course, the developer must use these rights. A deployment violation is something that you cannot do too often before you notice a command;).
There are some interesting user policies, but I only know a few people who really went to use them.
- Combine only policy
- This policy allows you to specify a pair of branches that can only receive merges of already tested in another branch.
- Forbidden Patterns Policy
- I sometimes used them to ensure that
/bin/debug , .exe or .dll was marked in the //src/ folder in TFS.
There are several third-party policies, but I have never used them. These include:
One of the reasons that too many third-party policies are not used is that all team members need to install policies on their machines. Team Foundation Server Power Tools can help you with distribution, but by default they are not deployed or configured on all development workstations.
Also available in blog form .