Skip to content

Configure settings & filter files from the CLI

Change a setting

und -db myProject.und settings -<CategoryNameOfSetting> <value>

The heading is the setting's category (e.g. report, metrics, C++) followed by the setting name — e.g. -C++UseStrict On, -MetricCyclomatic Strict. List settings that take multiple values use an Add/Remove suffix (e.g. -C++MacrosAdd), and you can pass @file to read values from a file. The naming scheme is documented on the und settings page, and every setting is listed in the settings reference (see also how the settings docs fit together).

Discover the exact setting names

Don't guess — list them for your project:

und list -all settings myProject.und      # every setting and its current value
und list -metrics settings myProject.und  # just the metric settings

und help settings explains the naming scheme and how list settings work (und list covers the other things list can show), and each setting has a copy-pasteable example in settings examples.

Control which files are in the project

  • Add / remove paths: und add … (directories are the default type) and und remove ….
  • Analyze a subset: und analyze -files @list.txt analyzes only the listed files.
  • Exclude/filter files: use the project's file-filter settings (find them via und list -all settings) to exclude paths/patterns, then re-analyze. Keeping third-party or generated code out of the project both speeds analysis and cleans up results.