(specs, errors, disallowTrailingRecursion, jsonSourceFile, specKey)
| 42110 | return !ts.hasExtension(pathToCheck) && excludeRegex.test(ts.ensureTrailingDirectorySeparator(pathToCheck)); |
| 42111 | } |
| 42112 | function validateSpecs(specs, errors, disallowTrailingRecursion, jsonSourceFile, specKey) { |
| 42113 | return specs.filter(function (spec) { |
| 42114 | if (!ts.isString(spec)) |
| 42115 | return false; |
| 42116 | var diag = specToDiagnostic(spec, disallowTrailingRecursion); |
| 42117 | if (diag !== undefined) { |
| 42118 | errors.push(createDiagnostic.apply(void 0, diag)); |
| 42119 | } |
| 42120 | return diag === undefined; |
| 42121 | }); |
| 42122 | function createDiagnostic(message, spec) { |
| 42123 | var element = ts.getTsConfigPropArrayElementValue(jsonSourceFile, specKey, spec); |
| 42124 | return element ? |
| 42125 | ts.createDiagnosticForNodeInSourceFile(jsonSourceFile, element, message, spec) : |
| 42126 | ts.createCompilerDiagnostic(message, spec); |
| 42127 | } |
| 42128 | } |
| 42129 | function specToDiagnostic(spec, disallowTrailingRecursion) { |
| 42130 | if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) { |
| 42131 | return [ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec]; |
no test coverage detected