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 @@ -350,16 +350,11 @@ export const codefileExtensions = new Set([
350350 '.zig' ,
351351] )
352352
353- // Some well-known code files without an extension
354- export const wellKnownCodeFiles = new Set ( [ 'Dockerfile' , 'Dockerfile.build' ] )
353+ // Code file names without an extension
354+ export const codefileNames = new Set ( [ 'Dockerfile' , 'Dockerfile.build' ] )
355355
356356/** Returns true if `filename` is a code file. */
357357export function isCodeFile ( filename : string ) : boolean {
358- if ( codefileExtensions . has ( path . extname ( filename ) . toLowerCase ( ) ) ) {
359- return true
360- } else if ( wellKnownCodeFiles . has ( filename ) ) {
361- return true
362- } else {
363- return false
364- }
358+ const ext = path . extname ( filename ) . toLowerCase ( )
359+ return codefileExtensions . has ( ext ) || codefileNames . has ( path . basename ( filename ) )
365360}
You can’t perform that action at this time.
0 commit comments