Manage exclusions

Manage Exclusions is an optional step in the source code upload process - it allows you to use to exclude specific files and/or folders in the uploaded archive file and manage project exclusion rules (available in AIP Console ≥ 1.26).

Ignore Patterns

In this section, any excluded items will be ignored during the source code analysis. A set of exclusion rules will be predefined via the "default" Exclusion Template which contains the most common items that should be excluded (see Administration Center - Settings - Exclusion templates for more information):

You are free to set whatever exclusion rules you require:

  • You can remove existing exclusions using the trash icon
  • You can add new existing exclusions using the Add Expression option (see below)

Options available

Overwrite existing exclusion rules

This option is only visible in rescan mode in AIP Console ≥ 1.25, when the Same configuration as previous version option is enabled.

When the option is:

  • disabled, all Ignore Patterns options are also disabled and cannot be edited or removed - this ensures that the same ignore patterns are applied to the new source code delivery as were applied in the previous delivery.
  • enabled, all Ignore Patterns options are also enabled and can be edited and removed - this allows you to change the ignore patterns for this new source code delivery. Bear in mind that changing the ignore patterns for a new delivery can impact the subsequent analysis results.

Note that this option should be typically left in the disabled position if you have imported an application from CAST Management Studio (see Import an Application managed with CAST Management Studio into AIP Console) and are re-analyzing the source code with AIP Console: exclusion rules are different in CAST Management Studio/Delivery Manager Tool and in AIP Console, and if you use the AIP Console interface to add the exclusion rules, these will overwrite the exclusion rules managed in CAST Management Studio/Delivery Manager Tool.

Retain source code zip in the application upload folder

This option is only visible:

When ticked, the selected source code folder will be zipped before the delivery/analysis begins, primarily so that any files that are excluded from the analysis can be retrieved if necessary. The ZIP file will be stored in the shared data location, in the Upload folder.

Expression: Add a new pattern using a glob pattern expression

The pattern matching system uses glob patterns (see for examples of how this system works). Enter an expression to match the folders you want to exclude and then click ADD to add the expression to the list of excluded items:

For example:

  • *.txt will exclude all files with the extension .txt
  • tests/ will exclude any folders named tests and everything inside them - e.g. root_folder/tests, root_folder/another_folder/tests
  • *.Tests/ will exclude any folders whose name includes .Tests (for example C:\Support\Delivery\Sample.Tests\sample\)
  • patterns starting with / will exclude starting only from the root folder. In other words, /tests/ will exclude everything in the specific folder root_folder/tests but not root_folder/another_folder/tests
You can add multiple expressions.

Preview (Available in AIP Console ≥ 2.1)

This option enables you to preview which files/folders will be excluded from the source code analysis. In the example below, an ignore pattern called "sql/" has been added (ignoring any folder named "sql" or "SQL"):

 Use exclusion template

This option enables you to choose from a template that has been predefined in the Administration Center - Settings - Exclusion templates panel under Exclusion Templates:

When a template is selected, the list of exclusions will be populated with those defined in the template. You can delete items if you prefer:

 Using the GUI to select items

Click  to access a screen where you can select the files and folder from the uploaded archive file you want to exclude (the archive will be unpacked by AIP Console) - place a check mark in the items that must be excluded, then click SAVE to add them to the list of exclusions:

Project Exclusion Rules

Available in AIP Console ≥ 1.26.

This section enables you to configure the "exclusion" rules for specific projects identified during the source code delivery. When an exclusion rule is matched, then the project in question will be ignored. The aim of these rules is to avoid a situation where multiple projects (and therefore Analysis Units) are generated for a given piece of source code when more than one is not needed. If you are unsure, you should leave the default settings as they are and review them before accepting delivery. 

  • for an Application's first version, all options are selected except Exclude Maven Java projects when an Eclipse project also exists
  • for an Application's subsequent versions, exclusion rules are pre-selected according to the options chosen in the previous version delivery.
  • the option Exclude all empty projects refers to projects that do not have associated source code.
  • the option Exclude Test code will exclude all folders named "test" that are discovered during the source code delivery

What next?

When you have made your option choices, click: