* Compute directory proximity between two file paths. * Returns a score based on the number of shared directory segments.
(filePath1: string, filePath2: string)
| 2035 | * Returns a score based on the number of shared directory segments. |
| 2036 | */ |
| 2037 | function computePathProximity(filePath1: string, filePath2: string): number { |
| 2038 | const dir1 = filePath1.split('/'); |
| 2039 | dir1.pop(); |
| 2040 | return pathProximityFromDirs(dir1, filePath2); |
| 2041 | } |
| 2042 | |
| 2043 | /** |
| 2044 | * Find the best matching node when there are multiple candidates |
no test coverage detected