LGTM Enterprise 1.21.1

set-project-config

Purpose

Load a project configuration file to provide either global or project-specific configuration details. This is equivalent to using the Default project configuration area of the Code analysis administration page (for global settings), or the Manual configuration area of the Analysis settings tab on the administration page for a single project.

For more information about global and project-specific configurations, see Configuring LGTM analysis.

Usage

[sudo] lgtm-cli set-project-config [--verbose] [--verbosity <level>] [--project <project-ID>] --file <path>

Flags

Flag Value Notes
--verbose

Optional. Output more detailed information about actions. This increases the verbosity to level 4.

Default (without a --verbose or --verbosity setting): level 3 verbosity

--verbosity Level

Optional. Specify how much detail you want to be included in the output. 0 suppresses all output and 6 outputs all available information. As an alternative, you can use the verbose flag as shorthand for --verbosity 4.

Default (without a --verbosity or --verbose setting): 3

--project Project URL identifier

Optional. The project you want to configure.

Specify the project using the project URL identifier. This is displayed on the Info tab of the individual project page in the administration interface. It makes up part of the URL when a project is displayed in LGTM. For example, if the full URL for the Overview page of a project is https://lgtm.example.com/projects/g/unitA/projectX/overview, then the project URL identifier is g/unitA/projectX.

Default: if undefined, the configuration is applied globally to all projects without an explicit project configuration file.

--file Path

Mandatory. The location of the file to upload. This must be a YAML format file and must meet the requirements of an lgtm.yml project configuration file.

Examples

To upload a default configuration for all projects from the file /lgtm/configurations/global.yml:

sudo lgtm-cli set-project-config --file /lgtm/configurations/global.yml

To upload a project configuration for the project displayed at: <lgtm-root-url>/projects/svn/team/project1:

sudo lgtm-cli set-project-config --project svn/team/project1 --file /lgtm/configurations/project1.yml

This overrides any globally defined configuration.