26.04.2015 Views

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Use Check-in Policies to Ensure That Developers Associate Work Items<br />

<strong>with</strong> Check-ins<br />

Set the Work Items check-in policy to force developers to associate their check-in <strong>with</strong> a<br />

work item.<br />

If a build breaks, it is important that you know what changesets are associated <strong>with</strong> the<br />

build, and what work items those changesets are associated <strong>with</strong>, so that you can identify<br />

the developer responsible for checking in this code and the area of the project on which<br />

the developer is working.<br />

To set the Work Items check-in policy to force developers to associate their check-in<br />

<strong>with</strong> a work item<br />

1. In <strong>Team</strong> Explorer, right-click your team project, select <strong>Team</strong> Project Settings, and<br />

then click Source Control.<br />

2. Click the Check-in Policy tab.<br />

3. Click Add and then select and configure the Work Item check-in policy.<br />

Additional Resources<br />

• For more information about check-ins, see “How to: Check In Pending Changes” at<br />

http://msdn2.microsoft.com/en-us/library/ms181411(VS.80).aspx<br />

• For more information about work items and changesets, see “How to: Associate<br />

Work Items <strong>with</strong> Changesets” at http://msdn2.microsoft.com/enus/library/ms181410(VS.80).aspx<br />

Create Check-in Policies to Enforce Coding Standards<br />

The project you are working on may require coding standards that are not covered by<br />

static code analysis or by existing check-in policies. For example, your project may<br />

require that your code never uses the tab character, or that all check-ins require<br />

comments. You can create new check-in policies to cover these scenarios.<br />

To enforce a code analysis check-in policy for a team project<br />

1. In <strong>Team</strong> Explorer, right-click your team project, point to <strong>Team</strong> Project Settings, and<br />

then click Source Control.<br />

2. Click the Check-in Policy tab and then click Add.<br />

3. In the Add Check-in Policy dialog box, select Code Analysis and then click OK.<br />

4. In the Code Analysis Policy Editor, select either Enforce C/C++ Code Analysis<br />

(/analyze) or Enforce Code Analysis For Managed Code. Select both if your<br />

project contains a combination of managed and unmanaged code.<br />

5. If you select managed code analysis, configure your required rule settings for<br />

managed code analysis based on your required coding standards.<br />

This determines precisely which rules are enforced.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!