Normalize a path to absolute against `cwd` for robust comparison.
(cwd: string, p: string)
| 46 | |
| 47 | /** Normalize a path to absolute against `cwd` for robust comparison. */ |
| 48 | function abs(cwd: string, p: string): string { |
| 49 | return path.isAbsolute(p) ? path.normalize(p) : path.resolve(cwd, p); |
| 50 | } |
| 51 | |
| 52 | /** Keep only the touched source files whose extension a checker can handle. Pure. */ |
| 53 | export function relevantTouchedFiles(touched: string[], spec: CheckerSpec): string[] { |
no test coverage detected