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
und process
runs all the commands in a text file
The process command reads in a text file and runs all the commands in it, remembering the database set at the beginning. The text file should follow this format:
1) Only one command per line. 2) Any words after '#' are ignored.
The process command will use the database given on the command line or the database remembered in interactive mode until a database is set inside the file. A sample text file for the process command might look like this:
#This line will be ignored
project.und #This line sets the database, and this comment would be ignored.
#The database could also be set using -db, like this.
-db myProject.und #This set the database for all future commands.
# The empty line is ignored
add file.h #The extra whitespace is removed and
#the add command is processed normally.
add "myFile.cpp" #Quotes can be used like on command line.
#The following would not be valid because there are multiple commands.
add thisFile.txt remove thatFile.txt
The process command can be invoked at startup by using (und fileToProcess.txt) or it can be ran later like this.
und process thisFile.txt myProject.und
process thisFile.txt (Interactive Mode)