Skip to content

Commit 8968b26

Browse files
committed
refactor: reduce unnecessary code
1 parent 4eacfdc commit 8968b26

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

packages/core/src/codewhisperer/commands/startSecurityScan.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,11 @@ export async function startSecurityScan(
156156
scanUuid,
157157
})
158158
}
159-
const zipType = scope === CodeAnalysisScope.PROJECT ? 'project' : 'file'
160159
const zipMetadata =
161-
zipType === 'file'
162-
? await zipUtil.zipFile(editor?.document.uri)
163-
: await zipUtil.zipProject(
164-
[...(vscode.workspace.workspaceFolders ?? [])] as CurrentWsFolders,
165-
defaultExcludePatterns,
166-
{ includeNonWorkspaceFiles: true }
167-
)
160+
scope === CodeAnalysisScope.PROJECT
161+
? await generateZipCodeScanForProject(zipUtil)
162+
: await zipUtil.zipFile(editor?.document.uri)
163+
168164
const projectPaths = getWorkspacePaths()
169165

170166
const contextTruncationStartTime = performance.now()

0 commit comments

Comments
 (0)