Absent Member.
Absent Member.
8325 views

Filter in Translation phase

Jump to solution

Hi,

Is it possible to filter some files during translation phase?

Now I have filter file with paths to some folders, but if I add -filter option (as during scan phase) I get such warning:

[warning]: The -filter option has no effect without the -scan option

I don't want translate files which are not analysed during 'scan' phase (mostly because of processing time)

Thanks,

Michal

0 Likes
1 Solution

Accepted Solutions
Absent Member.
Absent Member.

Hi Michał, filtering itself is limited to the scan phase. You can pass a list of categories, issue ID's or rule ID's to SCA with the -filter option. We then actually perform a complete scan, identify all issues, and then apply the filter when writing those issues to the FPR file - so anything specified in the filter file will not appear in the FPR.

However, if you wish to exclude files from the translation you can do so with the -exclude option. This is detailed on Page 50 of the . You can specify any files or directories you wish to be excluded from the translation. Please note, if you're using compiler integration (C/C++ or .NET scanning) the -exclude option will not work as SCA will simply translate everything which is built, instead you need to exclude those files from the build itself.

View solution in original post

0 Likes
1 Reply
Absent Member.
Absent Member.

Hi Michał, filtering itself is limited to the scan phase. You can pass a list of categories, issue ID's or rule ID's to SCA with the -filter option. We then actually perform a complete scan, identify all issues, and then apply the filter when writing those issues to the FPR file - so anything specified in the filter file will not appear in the FPR.

However, if you wish to exclude files from the translation you can do so with the -exclude option. This is detailed on Page 50 of the . You can specify any files or directories you wish to be excluded from the translation. Please note, if you're using compiler integration (C/C++ or .NET scanning) the -exclude option will not work as SCA will simply translate everything which is built, instead you need to exclude those files from the build itself.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.