user1
user1

Reputation: 780

How to exclude target folder from Fortify scans

I want to exclude all files that are underneath a target folder from translations and scans. I have tried to use the -exclude parameter but it doesn't seem to work.

[warning]: No files were excluded as the file patterns: [**/target/**/*] specified for -exclude option did not match any files.
HP Fortify Static Code Analyzer 6.42.0006 (using JVM 1.8.0_45)
Processing C:/path/ProjectName/target/test/test_fortify_exclusion2.jsp
Processing C:/path/ProjectName/target/test_fortify_exclusion.jsp

I have also tried **target** and **/target/**.

Upvotes: 2

Views: 7448

Answers (1)

user1
user1

Reputation: 780

Turned out I needed to specify the root path, preferably the path to the project. So in this example, it would have been: -exclude "C:/path/ProjectName/**/target/**/*"

Upvotes: 4

Related Questions