LGTM Enterprise 1.21.1

Overriding the global project configuration

LGTM lets you define a global configuration for projects. This is used, by default, by all projects. However, you can override this with a different configuration for specific projects.

The global project configuration can be overridden in two ways:

  • From the LGTM administration interface—You can add a project configuration using the Analysis settings tab on the project administration page.

  • From within the codebase—Developers can create an lgtm.yml configuration file in the project repository (see lgtm.yml configuration file in the user help).

Only one configuration is considered—that is, configuration settings do not cascade upwards or downwards between the global, project-specific (administration-level), and project-specific (in-repository) configurations. If there is an lgtm.yml file in the repository, this is used. If this is not found, LGTM looks for a project-specific configuration defined at the administration level. If that is not found, LGTM looks for a global project configuration.

Checking the current configuration

You can see exactly what configuration applies currently to any project by looking at the project page.

  1. Display the Projects administration page.

  2. Click the name of the project you're interested in, to display the project page.

  3. Click the Analysis settings tab to display the configuration details:

    • Manual configuration—shows any configuration defined for the project in LGTM.
    • Effective configuration—shows the configuration that currently applies to the project, either the lgtm.yml file stored in the repository, the manual configuration stored in LGTM, or the global configuration.

The effective configuration is empty when there is no project configuration defined in LGTM, or in the repository, and no global configuration is defined.

Adding or editing a configuration

Before you configure a project in the administration pages, always check if an lgtm.yml file is defined in the project repository (see above). If so, any changes you make to the configuration should be made to that file as well. Otherwise, the updated project configuration will only be used to analyze historic revisions that were added to the repository before the lgtm.yml file was added.

  1. Display the Projects administration page.

  2. Click the name of the project you're interested in, to display the project page.

  3. Click the Analysis settings tab to display the configuration details.

  4. In the text box in the Manual configuration section, add or edit the configuration as required.

    Configurations are specified using YAML syntax and support exactly the same options as the lgtm.yml file.

    For details of the options, see lgtm.yml configuration file in the user help.

  5. Click Save to save your changes.

To revert to the global configuration, clear the contents of the section and click Save.

After saving, verify that the configuration displayed in the Effective configuration section changes to match the new Manual configuration:

  • Effective configuration updated—the new manual configuration will be used by the project.

  • No change to effective configuration—there is an lgtm.yml or .lgtm.yml file stored in the repository for this project. This takes precedence over the Manual configuration defined here. You will need to discuss the configuration with the development team.

How soon do changes take effect?

The changes take effect as follows:

Related topicsRelated topics