(file: string | undefined)
| 170 | } |
| 171 | |
| 172 | export function isValidEntryFile(file: string | undefined) { |
| 173 | if (!file || !isDartFile(file)) |
| 174 | return false; |
| 175 | |
| 176 | // When in a no-folder workspace, all Dart files are considered runnable. |
| 177 | if (!workspace.workspaceFolders?.length) |
| 178 | return true; |
| 179 | |
| 180 | return isTestFile(file) |
| 181 | || isInsideFolderNamed(file, "bin") || isInsideFolderNamed(file, "tool") || isInsideFolderNamed(file, "test_driver") |
| 182 | || file.endsWith(`lib${path.sep}main.dart`); |
| 183 | } |
| 184 | |
| 185 | export function getLatestSdkVersion(): Promise<string> { |
| 186 | return new Promise<string>((resolve, reject) => { |
no test coverage detected