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.
Note: |
|---|
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:
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.
Other Resources