5.4.4. Configuration¶
To access the settings, open File > Settings (CLion >
Settings on macOS) and navigate to
Tools > Axivion.
Axivion CLion Plugin Settings¶
The Log level in the Advanced section 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 Installation Directory is needed to start other processes for
local analysis (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 accesses the analysis results through the Axivion Dashboard Server. Therefore, the first step after installing the plugin is to configure access to the Axivion Dashboard Server.
In the Axivion Web Servers section, click the +
icon and specify a unique, recognizable name as the Server Name, the
URL of the Axivion Dashboard Server, and the username with which you wish to log in to the
Axivion Dashboard Server. The name will be used in the Issues View to select
the Axivion Dashboard Server to connect to. You can configure multiple Axivion Dashboard Servers.
By 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
(View > Tool Windows > Issues View). If the dashboard
configuration is correct, you should be prompted for the Axivion Dashboard Server password. The
password is stored as configured in 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 leftmost 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 plain 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 an 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 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 defines the mapping between local
paths and analysis projects. This allows the plugin to jump to the corresponding local
file when you double-click 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 settings.
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 triggered by double-clicking 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 Search manually.
When the user selects Search manually, 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. Canceling the selection of candidates will not
open the file explorer window.
If successful, a path mapping entry is generated in the CLion settings.
To configure the path mapping manually, open File > Settings,
navigate to Tools > Axivion, and click the +
icon in the Path Mappings section. This section provides a list of path
mapping configurations. You must specify a project name from the projects available
in your configured Axivion Dashboard Server and assign a corresponding local path 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. Consequently, every issue path retrieved from the Axivion Dashboard Server that matches the analysis path is redirected 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 detailed configuration example can be found in the documentation of the Axivion Visual Studio Plugin in Section Example Configuration.