qsort comparator: scopes by dir_prefix length, descending. */
| 152 | |
| 153 | /* qsort comparator: scopes by dir_prefix length, descending. */ |
| 154 | static int cmp_scope_by_specificity(const void *a, const void *b) { |
| 155 | const cbm_path_alias_scope_t *sa = a; |
| 156 | const cbm_path_alias_scope_t *sb = b; |
| 157 | size_t la = strlen(sa->dir_prefix); |
| 158 | size_t lb = strlen(sb->dir_prefix); |
| 159 | if (lb > la) { |
| 160 | return 1; |
| 161 | } |
| 162 | if (lb < la) { |
| 163 | return -1; |
| 164 | } |
| 165 | return 0; |
| 166 | } |
| 167 | |
| 168 | /* ── tsconfig.json / jsconfig.json loader ──────────────────────── */ |
| 169 |
nothing calls this directly
no outgoing calls
no test coverage detected