Configuring Your Project
When setting a component option it can be set at different levels:
- Component - Options set here are global to the component/project. Options that apply to all or significant parts of the project should be set at this level. In the GUI, options can be set using the Project Properties dialog, in the Analysis. In the CLI, see qacli pprops for details on how to set an option at the component level.
- Directory - Options set here are specific to the files in that directory (and sub-directories). In the GUI, select the directory in the Files panel and then add options using the Analysis Options sub-panel. In the CLI, see qacli project files for details on how to set an option at the directory level.
- File - Options set here are specific to that file. In the GUI, select the file in the Files panel and then add options using the Analysis Options sub-panel. In the CLI, see qacli project files for details on how to set an option at the file level.
Files and directories can be marked as "third party" via the Analysis Options sub-panel or through the CLI as described in qacli project files. Third party files/directories have a unique icon in the Files panel to make them easier to identify.
The files will still be scanned - if dataflow is enabled, minimal settings will be used - but only the cross-module analysis results will be shown. For example, when your project contains code from a vendor that you can't change, but you still need to know if there are any cross-module problems, such as global variable conflicts.
Options (component, then directory, then file) are collected together and placed into the .via
file. The components use that file to determine which option takes priority. There are two kinds of options:
- Single Value - Options that have a single, definitive value, such as 'unsignedchar'. The last value in the
.via
will take priority so a single value option at the File level takes priority over a similar option at the Directory level, which takes priority over a similar option at the Component level. - Cumulative - Options that can have multiple values, such as 'forceinclude'. Due to its cumulative nature the first value in the
.via
will take priority. If this is not desired, consult the-forgetall,-forget
section in the user manual for the relevant component or Helix QAC for C/C++ for a method to work around this behavior.
Where possible, options should be set at the component level, then directory level, then finally on a file-by-file basis. Setting many options for several files will cause the main configuration file to grow excessively and will impact the performance of the project.