Skip to content

Commit eeaaeb6

Browse files
authoredMar 18, 2025
Add "accepted diffs" to test runner, accept diffs for Programs with unsupported extensions (microsoft#655)
1 parent 026e5f9 commit eeaaeb6

File tree

1,992 files changed

+146
-77
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,992 files changed

+146
-77
lines changed
 

‎.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,5 @@ custom-gcl.hash
192192
.DS_Store
193193

194194
.idea
195+
196+
!testdata/submoduleAccepted.txt

‎cmd/tsgo/main.go

+2-9
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,8 @@ func main() {
237237
printDiagnostics(ts.SortAndDeduplicateDiagnostics(diagnostics), host, compilerOptions)
238238
}
239239

240-
var unsupportedExtensions []string
241-
for _, file := range program.SourceFiles() {
242-
extension := tspath.TryGetExtensionFromPath(file.FileName())
243-
if extension == tspath.ExtensionTsx || slices.Contains(tspath.SupportedJSExtensionsFlat, extension) {
244-
unsupportedExtensions = core.AppendIfUnique(unsupportedExtensions, extension)
245-
}
246-
}
247-
if len(unsupportedExtensions) != 0 {
248-
fmt.Fprintf(os.Stderr, "Warning: The project contains unsupported file types (%s), which are currently not fully type-checked.\n", strings.Join(unsupportedExtensions, ", "))
240+
if exts := program.UnsupportedExtensions(); len(exts) != 0 {
241+
fmt.Fprintf(os.Stderr, "Warning: The project contains unsupported file types (%s), which are currently not fully type-checked.\n", strings.Join(exts, ", "))
249242
}
250243

251244
if compilerOptions.ListFiles.IsTrue() {

0 commit comments

Comments
 (0)