---
url: /howto/editing-an-analysis-profile.md
description: >-
  This guide shows you how to edit an analysis profile that tells Teamscale
  which checks and tools to use when analyzing your code.
---

# How to Edit an Analysis Profile

You can begin editing an analysis profile from two locations in Teamscale:

* by clicking the  *button* in the
  [Analysis Profiles View](../../reference/ui/project/analysis-profiles/)
* by clicking the *Edit-button* when viewing an analysis profile in the
  [Check Explorer](../../reference/ui/check-explorer/)

By default, an extension of the [Check Explorer](../../reference/ui/check-explorer/) is used to edit an analysis profile.

![Editing C# in Check Explorer](screenshot_editing_c-sharp-default_in_check_explorer.png)

:::warning
The changes made in the Check Explorer only take effect after saving the analysis profile. They do not affect existing
projects using the profile, unless you select them for reanalysis when saving the analysis profile.
:::

## Editing General Options of the Analysis Profile

First of all, you can edit the analysis profile's description by clicking on *Description* at the top of the Check Explorer.

In order to change the currently analyzed programming languages and additional analysis tools, you can click *Language & Tool
Enablement* in *Analysis Profile Settings* below the profile's description. Each of the languages and tools comes with their own preconfigured
analysis groups and checks, which are set to their default severity when adding a new language/tool.

![Screenshot of editing programming languages](screenshot_edit_languages_and_tools.png)

Next to the *Language & Tool Enablement* you can click&#x20;*&#x20;Advanced options* to inspect and edit
more options for the analysis profile.

![](./screenshot_advanced_options_in_check_explorer.png){style="max-width: 500px"}

These global options do not affect a single quality indicator but rather the entire analyzed project, e.g. whether to enable searching.

## Editing Quality Indicators and Analysis Groups

After selecting languages and tools to work with, you can adjust the check configuration to your needs, including quality indicators
and analysis groups.

Similar to the [Check Explorer](../../reference/ui/check-explorer/), the list on the left side contains the profile's
quality indicators and their analysis groups, while the right one contains the checks for the currently selected
indicator/group. Additionally, there is a list of analysis groups at the bottom
of the view, which are available to your languages and tools, but disabled in the current configuration.

![](./screenshot_disabled_analysis_groups_list.png){style="max-width: 350px"}

You have multiple options to edit the current configuration:

1. Add a new quality indicator.

   In order to add a new quality indicator you have to click&#x20;*&#x20;Add new quality indicator*, which
   opens a new dialog where you have to enter a valid name (not only whitespace, no duplicate name) and confirm.

2. Delete a quality indicator.

   In order to delete a quality indicator you have to click its&#x20;*&#x20;button* and confirm
   the dialog.
   :::warning
   If you delete a quality indicator, all of its analysis groups will be disabled.
   :::

3. Rename a quality indicator.

   In order to rename a quality indicator, click its  button and enter a valid name into the
   dialog that opens.

4. Enable a disabled analysis group.

   In order to enable a currently disabled analysis group you have to click its&#x20;*&#x20;button* and, in
   the upcoming dialog, select the quality indicator to put it into.
   :::warning
   If you enable a disabled analysis group you disabled in the same editing session, its checks will be enabled with
   their **previous severity**.

   If you enable a disabled analysis group that was disabled before you began editing, its checks will be enabled with
   their **default severity**.
   :::

   ![Screenshot of selecting a target indicator](screenshot_select_indicator_dialog.png)

5. Disable an enabled analysis group.

   In order to disable an enabled analysis group, click its  button.

6. Move an enabled analysis group between different quality indicators.

   Since quality indicators can be used to group related analysis groups, you can move an enabled analysis group
   between them. For this purpose you have to click the button next to its  button.
   ![](./screenshot_single_analysis_group.png){style="max-width: 350px"}

   A dialog similar to the one above is opened, where you can select the quality indicator to move it to.

7. Adjust indicator- or group-specific options.

   Some quality indicators and analysis groups have a number of additional options, which is indicated by the
   presence of an  button in the respective item in the list. In order to inspect and edit them
   you have to click it.

## Editing Checks

You might want to enable or disable one or more multiple specific checks that are part of an enabled analysis group. For
this purpose you have to select it in the list of checks next to the list of quality indicators and analysis groups.
As a result the selected check, its description and its options, if it has any, are shown on the right side of the view
and can be edited there. In the top right corner of the check description is its severity, which you change to a
different value by clicking it and choosing the preferred option in the dropdown.

![](./screenshot_enablement_dropdown.png){style="max-width: 100px"}

For larger operations, for example changing the severity values of all checks in a certain quality indicator, you can
click the *Set all checks to* dropdown and select your preferred value. As a result, the severity of all **currently
visible/selected** checks is changed. This dropdown also allows you to set a check's severity to its default value.

![](./screenshot_set_all_checks_to_dropdown.png){style="max-width: 175px"}

***

Finally, you can save your changes to the analysis profile by clicking *Save Analysis Profile*. If there are any
projects using the analysis profile, you will be prompted with a dialog to select the ones you want to reanalyze. Any
changes you made in the analysis profile will not affect the ones you did not select.

## Code Scopes Support

Teamscale's [Code Scopes Support](../../reference/ui/project/project/#code-scope-configuration) allows to apply different analysis profiles to different parts of a project's code base.
For some settings, choosing different settings is either not possible or not yet supported. Settings that are Code Scope-aware are indicated as such with a (C) icon in the Check Explorer.
If an analysis profile sets an option that is not Code Scope-aware to a different value than another analysis profile referenced by the same project, an informative warning will be shown hinting at the inconsistency.
If such an inconsistency occurs, it has to be resolved before the project can be re-analyzed.
A common strategy to resolve inconsistencies is to set the respective option to the same value in all referenced analysis profiles.
![Code Scopes Configuration Validation](./analysis-profile-edit-code-scopes-validation.png)
