BennyT
BennyT

Reputation: 83

Custom Code Analysis TFS Check-In Policy

Is there any way to create a custom TFS check-in policy that can jump through each node within the code being checked in for code standards we have defined?

Upvotes: 2

Views: 1693

Answers (2)

John Saunders
John Saunders

Reputation: 161831

You don't need a separate check-in policy for that. Use the policy that requires that the code be built. Configure the solution to require code analysis, and set the rules so that the most important rules cause errors when they're violated.

When the rules are violated, the code won't build, and since the code won't build, you can't check it in.

Upvotes: 0

Jimmy Chandra
Jimmy Chandra

Reputation: 6580

Take a look at this particular screencast. It's a very good place to start.

You might also want to take a look at the StyleCop CodePlex project which deal with stuffs like coding standard and formatting.

The combination of the two might yield you what you want.

Here is another resource if you like reading instead of watching.

Upvotes: 2

Related Questions