(sourceFiles []string, rootDirectory string)
| 1583 | } |
| 1584 | |
| 1585 | func (p *Program) checkSourceFilesBelongToPath(sourceFiles []string, rootDirectory string) bool { |
| 1586 | allFilesBelongToPath := true |
| 1587 | for _, file := range sourceFiles { |
| 1588 | absoluteSourceFilePath := tspath.GetCanonicalFileName(tspath.GetNormalizedAbsolutePath(file, p.GetCurrentDirectory()), p.UseCaseSensitiveFileNames()) |
| 1589 | if !tspath.ContainsPath(rootDirectory, file, p.comparePathsOptions) { |
| 1590 | p.includeProcessor.addProcessingDiagnostic(&processingDiagnostic{ |
| 1591 | kind: processingDiagnosticKindExplainingFileInclude, |
| 1592 | data: &includeExplainingDiagnostic{ |
| 1593 | file: tspath.Path(absoluteSourceFilePath), |
| 1594 | message: diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, |
| 1595 | args: []any{file, rootDirectory}, |
| 1596 | }, |
| 1597 | }) |
| 1598 | allFilesBelongToPath = false |
| 1599 | } |
| 1600 | } |
| 1601 | |
| 1602 | return allFilesBelongToPath |
| 1603 | } |
| 1604 | |
| 1605 | type WriteFileData struct { |
| 1606 | SourceMapUrlPos int |
nothing calls this directly
no test coverage detected