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 store machine-specific project data, such as the analysis data, in the project's 'local' folder instead of the user's AppData folder. You can also use it to share an analyzed project with someone who can't build it on their machine. To view source, they need the files at the same place relative to the project. Don't commit the 'local' folder to version control.

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