* When `rel` is a file in a `build` folder below `src/` that a build step could * have written, that folder (see srcBuildFolderOf); otherwise null. * * The folder itself is walked: projects keep real source there (luci-go * milo's whole `src/build/` feature, Go's `src/go/build`, a .NET s
(rel: string)
| 399 | * for a removed folder carries no trailing slash), never files a build writes. |
| 400 | */ |
| 401 | function buildOutputFolderUnderSrc(rel: string): string | null { |
| 402 | const name = rel.slice(rel.lastIndexOf('/') + 1); |
| 403 | if (!name.includes('.')) return null; |
| 404 | if (HAND_WRITTEN_SOURCE.test(name) && !DECLARATION_FILE.test(name)) return null; |
| 405 | return srcBuildFolderOf(rel); |
| 406 | } |
| 407 | |
| 408 | /** |
| 409 | * `ig` with {@link buildOutputFolderUnderSrc} applied on top of its patterns, |
no test coverage detected