About File Processing During an Import

Code Insight 2021 R2

Depending on the import configuration, the import process might need to match files paths in the import data file with file paths in the target project codebase to do the following:

Create new file associations in inventory in the target project.
Mark reviewed files in the import data file as reviewed in the target project.
Determine empty files.

The file path and the file MD5 value are the key criteria used to locate target codebase files that match files in the import data file. When the MD5 value is used as a criterion, the MD5 for a file in the import data file must have an exact MD5 match in the target codebase. However, when the file path is used as a criterion, the file-matching process can apply various rules.

File-Path Processing

When the file path is used as a criterion for matching, the import process internally subtracts the root path from the absolute path of codebase files in the import data file and in the target project. The result is the complete file path for a given file, as illustrated in these examples:

Absolute file path/home/fnci/scanRoot/1/ePortal-1.3/src/gettext.c 
Root path/home/fnci/scanRoot/1/ 
Complete File path/ePortal-1.3/src/gettext.c 

Then, based on the file-path criterion selected by the user, the import locates matching files by searching complete file paths, partial paths, or simply file names. The following examples illustrate a complete path in comparison with a partial path or file name:

Complete path/ePortal-1.3/copy1/src/gettext.c 
Partial path/copy1/src/gettext.c or /src/gettext.c)
File namegettext.c

When users select the partial path as a criterion for matching files, they must also provide a desired directory depth that defines the partial path.