File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
amazonq/.changes/next-release Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "type" : " Bug Fix" ,
3+ "description" : " Amazon Q /dev not adding Dockerfiles in nested folders"
4+ }
Original file line number Diff line number Diff line change @@ -348,16 +348,11 @@ export const codefileExtensions = new Set([
348348 '.zig' ,
349349] )
350350
351- // Some well-known code files without an extension
352- export const wellKnownCodeFiles = new Set ( [ 'Dockerfile' , 'Dockerfile.build' ] )
351+ // Code file names without an extension
352+ export const codefileNames = new Set ( [ 'Dockerfile' , 'Dockerfile.build' ] )
353353
354354/** Returns true if `filename` is a code file. */
355355export function isCodeFile ( filename : string ) : boolean {
356- if ( codefileExtensions . has ( path . extname ( filename ) . toLowerCase ( ) ) ) {
357- return true
358- } else if ( wellKnownCodeFiles . has ( filename ) ) {
359- return true
360- } else {
361- return false
362- }
356+ const ext = path . extname ( filename ) . toLowerCase ( )
357+ return codefileExtensions . has ( ext ) || codefileNames . has ( path . basename ( filename ) )
363358}
You can’t perform that action at this time.
0 commit comments