5.4.4. Configuration

To access the settings, open the File > Settings (CLion > Settings on MacOS) and navigate to Tools > Axivion.

|clionplugin| Settings.

Axivion CLion Plugin Settings

The Log Level controls how much information is logged. The recommended setting is WARNING. The level DEBUG should only be used temporarily to investigate a problem.

The Axivion Suite Directory is needed to start other processes for the local analyses (e.g. Local Build).

The option Save all open files before starting an analysis triggers CLion to save all open files with changes before starting a local analysis.

5.4.4.1. Connection to Axivion Dashboard Server

The Axivion CLion Plugin is accessing the analysis results through the Axivion Dashboard Server. Therefore, the first step after installing the plugin is to configure the access to the Axivion Dashboard Server.

In the Axivion Web Servers section, click the + icon and specify a workspace unique recognizable name as the Dashboard ID, the URL of the Axivion Dashboard Server, and the username with which you wish to login to the Axivion Dashboard Server. The ID will be used in the Issues View to select the Axivion Dashboard Server to connect to. You can configure multiple Axivion Dashboard Servers.

Per default, the system username is used to connect to the Axivion Dashboard Server. You can specify a username per Axivion Dashboard Server in the Axivion Web Servers section.

After the Axivion Dashboard Server is configured, open the Issues View pane (Axivion Suite > Axivion: Issues View). If the dashboard configuration is correct, you should be prompted for the Axivion Dashboard Server password. The password is stored as configured for Clion. Please refer to https://www.jetbrains.com/help/idea/reference-ide-settings-password-safe.html.

After entering the correct password, you should be able to select an analysis project using the left-most combobox in the window, and view the list of issues within that project. See Section Issue View for more details on the Issues View window.

If the connection to the Axivion Dashboard Server fails, an error message will be displayed in place of the issue list.

The password will be transmitted to the Axivion Dashboard Server in clear text. Use HTTPS to prevent the password from being visible while it is being transmitted over the network.

If you are accessing the Axivion Dashboard Server over HTTPS, and the server is using a self-signed certificate, you might receive a error window where you can accept or reject the self-signed certificate.

5.4.4.2. Path Mapping

Issues found by the Axivion Suite analysis will reference files on the build machine where the analysis was performed. In contrast, the CLion editor operates on local files on the developer’s machine.

The path mapping in the Axivion CLion Plugin determines the mappings between local paths and analysis projects. This allows the plugin to jump to the corresponding local file when double-clicking on an issue in the Issues View window. It also works in the opposite direction: when opening a local file in the CLion editor, the path mapping is used to determine the corresponding analysis project and file, and all the issues found in the latest analysis of that file are shown in the breakpoint margin.

The path mapping configuration is stored in the CLion configuration. Alternatively, path mapping configuration can also be stored in the “Global configuration” ($HOME/.bauhaus/launcher.config).

Configuration of the Path Mapping

The Axivion CLion Plugin can try to infer the path mapping automatically based on a local path. This is done by double clicking on an issue in the Issues View. If no matching path mapping is defined for the current project, the Axivion CLion Plugin searches for files inside the current workspace matching the file path.

If candidates are found, the user can choose one of the suggested files or pick the option to “Search manually”. Either by selecting the “Search manually” choice, cancelling the automatic search, or when the Axivion CLion Plugin does not find any local path candidates, a file explorer window opens and prompts the user to locate the file containing this issue. If this is successful, a path mapping entry is generated in the CLion configuration.

To configure the path mapping manually, open the File > Settings and navigate to Tools > Axivion and click the + icon in the Axivion Path Mappings section. This is a list of path mapping configurations. You need to specify a project name from the projects available in your configured Axivion Dashboard Server and assign a local path to that, so that the Axivion CLion Plugin can open the correct file. The local path denotes a directory that corresponds to the base path of the analysis. It is stored as an absolute path in your file system.

Optionally, you can select an analysis path prefix for which the mapping should be applied. That is, every path of an issue retrieved from the Axivion Dashboard Server that matches the analysis path is re-directed to your local path. This is useful, if only some parts of the analyzed source code are available locally.

The analysis path is a relative path describing a directory within the analysis project (relative to the basepath of the analysis project). If left empty, the mapping entry refers to the basepath of the analysis project.

A more elaborated example of a configuration can be found in the documentation of the Axivion Visual Studio Plugin in Section Example Configuration.