und is the command-line interface to Understand — script project creation, analysis, CodeCheck, metrics, and reports, locally or in CI.
Run Understand from the command line · Headless workflow: create, analyze, check, report
Named Roots
named roots: make non-relative projects portable
Named roots are used to make non-relative projects portable. A named root is a mapping of a name to a directory path. Named roots facilitate project portability by allowing directory paths to vary between machines. A file may use a named root if the file resides beneath the named root directory in the file system. For example:
SRC=C:\mywork\src
would be a valid named root for files inside of C:\mywork\src\foobar
Note: A named root cannot be nested beneath another named root.
Valid named root identifiers must:
- be in all caps - be two or more characters long - begin with an alphabetic character - contain only alphabetic, numeric, '$', or '_' symbols
Example: HOME_DIR
Existing named roots, unmapped named roots and unportable files that are not mapped to named roots can all be viewed with:
und list -unmapped -unportable roots myProject.und
New named roots can be added to a project with:
und add -root SRC=C:\mywork\src myproject.und