1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

chore(checkmarxExecuteScan): split and trim filterPattern (#3661)

This commit is contained in:
Christian Volk 2022-03-23 11:45:05 +01:00 committed by GitHub
parent 22f6aa156f
commit 26bf3808fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,7 +226,7 @@ func loadExistingProject(sys checkmarx.System, initialProjectName, pullRequestNa
func zipWorkspaceFiles(filterPattern string, utils checkmarxExecuteScanUtils) (*os.File, error) {
zipFileName := filepath.Join(utils.GetWorkspace(), "workspace.zip")
patterns := strings.Split(strings.ReplaceAll(strings.ReplaceAll(filterPattern, ", ", ","), " ,", ","), ",")
patterns := piperutils.Trim(strings.Split(filterPattern, ","))
sort.Strings(patterns)
zipFile, err := os.Create(zipFileName)
if err != nil {