TFS provides many check-in policies, which ensures the quality of code checked into TFS. Usage of proper check-in policies avoid issues related to broken builds and lack of coding standards.
Built-in Check-in Policies:
This policy ensures that the code will get check-in only after successful completion of build
Changeset Comments Policy
This policy require users to provide check-in comments
This policy requires that one or more work items be associated with every check-in
This policy requires that code Analysis is run before check-in