Export (0) Print
Expand All

How to: Update Code Analysis Check-in Policy

You can enable code analysis as part of the check-in policy to control and improve the quality of the code that is checked into the code base. After the policy is specified, team members can synchronize their code analysis settings for the solution against the server policy settings.

NoteNote:

This feature is available only if you are using Team Foundation Server.

Code analysis settings apply to the local projects whereas the check-in policy is set at the solution level. When you update your code analysis settings from the check-in policy, you will be updating all projects in the solution

You can update the code analysis settings for the solution in one of the following ways:

  • Replace the current code analysis policy settings of your solution with the team policy settings on the server.

  • Add the team policy settings to the current code analysis settings of your solution.

    Important noteImportant Note:

    Updating policy settings will change your active project configuration. You should consider creating a separate configuration for check-ins; after you create a new configuration, update server settings. Check-in policy applies at the project level.

To update the current code analysis settings by replacing them with the check-in policy

  • Click Analyze, point to Code Analysis Settings for Solution, and then click Replace with Check-in Policy.

    - or -

  • In Solution Explorer, right-click the solution, point to Code Analysis Settings for Solution, and then click Replace with Check-in Policy.

    - or -

  • Click File, point to Source Control, point to Code Analysis Settings for Solution, and then click Replace with Check-in Policy.

Code analysis settings are applied to each project in the solution.

To update the current code analysis settings by merging the check-in policy

  • Click Analyze, point to Code Analysis Settings for Solution, and then click Merge with Check-in Policy.

    - or -

  • In Solution Explorer, right-click the solution, point to Code Analysis Settings for Solution, and then click Merge with Check-in Policy.

    - or -

  • Click File, point to Source Control, point to Code Analysis Settings for Solution, and then click Merge with Check-in Policy.

    Code analysis settings are applied to each project in the solution.

Community Additions

ADD
Show:
© 2014 Microsoft