File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import { fs } from '../../shared/fs/fs'
13
13
import { getLoggerForScope } from '../service/securityScanHandler'
14
14
import { runtimeLanguageContext } from './runtimeLanguageContext'
15
15
import { CodewhispererLanguage } from '../../shared/telemetry/telemetry.gen'
16
- import { CurrentWsFolders , collectFiles } from '../../shared/utilities/workspaceUtils'
16
+ import { CurrentWsFolders , collectFiles , defaultExcludePatterns } from '../../shared/utilities/workspaceUtils'
17
17
import {
18
18
FileSizeExceededError ,
19
19
NoActiveFileError ,
@@ -419,8 +419,11 @@ export class ZipUtil {
419
419
: vscode . workspace . workspaceFolders ) as CurrentWsFolders ,
420
420
{
421
421
maxSizeBytes : this . getProjectScanPayloadSizeLimitInBytes ( ) ,
422
- } ,
423
- useCase
422
+ excludePatterns :
423
+ useCase === 'TEST_GENERATION'
424
+ ? [ ...CodeWhispererConstants . testGenExcludePatterns , ...defaultExcludePatterns ]
425
+ : defaultExcludePatterns ,
426
+ }
424
427
)
425
428
for ( const file of sourceFiles ) {
426
429
const projectName = path . basename ( file . workspaceFolder . uri . fsPath )
Original file line number Diff line number Diff line change @@ -355,8 +355,7 @@ export async function collectFiles(
355
355
excludeByGitIgnore ?: boolean // default true
356
356
excludePatterns ?: string [ ] // default defaultExcludePatterns
357
357
filterFn ?: CollectFilesFilter
358
- } ,
359
- useCase ?: FeatureUseCase
358
+ }
360
359
) : Promise < CollectFilesResultItem [ ] > {
361
360
const storage : Awaited < CollectFilesResultItem [ ] > = [ ]
362
361
@@ -387,10 +386,7 @@ export async function collectFiles(
387
386
const inputExcludePatterns = options ?. excludePatterns ?? defaultExcludePatterns
388
387
const maxSizeBytes = options ?. maxSizeBytes ?? maxRepoSizeBytes
389
388
390
- const excludePatterns = [
391
- ...getGlobalExcludePatterns ( ) ,
392
- ...( useCase === FeatureUseCase . TEST_GENERATION ? [ ...testGenExcludePatterns , ...defaultExcludePatterns ] : [ ] ) ,
393
- ]
389
+ const excludePatterns = [ ...getGlobalExcludePatterns ( ) ]
394
390
if ( inputExcludePatterns . length ) {
395
391
excludePatterns . push ( ...inputExcludePatterns )
396
392
}
You can’t perform that action at this time.
0 commit comments