File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2430,12 +2430,14 @@ namespace ts {
24302430 }
24312431
24322432 // List of collected files is complete; validate exhautiveness if this is a project with a file list
2433- if ( options . composite && rootNames . length < files . length ) {
2434- const normalizedRootNames = rootNames . map ( r => normalizePath ( r ) . toLowerCase ( ) ) ;
2435- const sourceFiles = files . filter ( f => ! f . isDeclarationFile ) . map ( f => normalizePath ( f . path ) . toLowerCase ( ) ) ;
2436- for ( const file of sourceFiles ) {
2437- if ( normalizedRootNames . every ( r => r !== file ) ) {
2438- programDiagnostics . add ( createCompilerDiagnostic ( Diagnostics . File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern , file ) ) ;
2433+ if ( options . composite ) {
2434+ const sourceFiles = files . filter ( f => ! f . isDeclarationFile ) ;
2435+ if ( rootNames . length < sourceFiles . length ) {
2436+ const normalizedRootNames = rootNames . map ( r => normalizePath ( r ) . toLowerCase ( ) ) ;
2437+ for ( const file of sourceFiles . map ( f => normalizePath ( f . path ) . toLowerCase ( ) ) ) {
2438+ if ( normalizedRootNames . indexOf ( file ) === - 1 ) {
2439+ programDiagnostics . add ( createCompilerDiagnostic ( Diagnostics . File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern , file ) ) ;
2440+ }
24392441 }
24402442 }
24412443 }
You can’t perform that action at this time.
0 commit comments