We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4d7417 commit f53b324Copy full SHA for f53b324
packages/core/src/shared/filetypes.ts
@@ -347,8 +347,20 @@ export const codefileExtensions = new Set([
347
'.zig',
348
])
349
350
+// Some important files start with a known prefix
351
+export const codeFilePrefixes = new Set(['Dockerfile'])
352
+
353
/** Returns true if `filename` is a code file. */
354
export function isCodeFile(filename: string): boolean {
- const ext = path.extname(filename).toLowerCase()
- return codefileExtensions.has(ext)
355
+ if (codefileExtensions.has(path.extname(filename).toLowerCase())) {
356
+ return true
357
+ }
358
359
+ for (const prefix of codeFilePrefixes) {
360
+ if (filename.startsWith(prefix)) {
361
362
363
364
365
+ return false
366
}
0 commit comments