scitools.com

← All und commands

und is the command-line interface to Understand — script project creation, analysis, CodeCheck, metrics, and reports, locally or in CI.

und create

creates an empty database

und create [-db <database.und>] [-local] [-languages <c++ c#> ...] [settings...]

The create command generates a new database. It accepts the same settings as the settings command (und help settings).

Basic Usage

Specify the new database name with the -db option or as the last parameter.

und create -db newDatabase.und -languages <c++ c#> (optional) ...

Saving Analysis Data Locally

Use -local to save analysis data in the project's 'local' folder. This allows sharing data between machines, but requires identical source code, library, system, and compiler file paths. If -local is not used, data is stored in the user's AppData folder.

und create -db <newDatabase.und> -local -languages <c++ c#> ...

Creating a Database for a Specific Git Commit

Use -gitcommit to associate the database with a specific commit. This only affects how file contents are found, not which files are added (use und add for that).

und create -db <newDatabase.und> -gitcommit <githash> -languages ...
OptionDescription
-gitcommit githashAssociate the database with the given git commit; file contents are read from that commit.

Additional Options for Git Commit Databases:

OptionDescription
-refdb dbname.undCopy settings from an existing database (dbname.und) instead of creating an empty database. This also sets the new database as a comparison project in the referenced database.
-gitrepo pathUse the provided directory as the git repository. If this is not provided and a reference database is provided, the reference database's repository is used. If a reference database is not available, this defaults to the directory of the new database.

Important Notes