Check if any library identifier appears as a substring in the QN. * Case-sensitive: "requests" matches "project.venv.requests.api.get" * but not "Requests". Library names are specific enough to avoid * false positives even with substring matching. */
| 539 | * but not "Requests". Library names are specific enough to avoid |
| 540 | * false positives even with substring matching. */ |
| 541 | static const lib_pattern_t *match_qn(const char *qn, const lib_pattern_t *patterns) { |
| 542 | if (!qn || !qn[0]) { |
| 543 | return NULL; |
| 544 | } |
| 545 | for (int i = 0; patterns[i].library_id != NULL; i++) { |
| 546 | if (strstr(qn, patterns[i].library_id) != NULL) { |
| 547 | return &patterns[i]; |
| 548 | } |
| 549 | } |
| 550 | return NULL; |
| 551 | } |
| 552 | |
| 553 | static bool starts_with_segment(const char *path, const char *segment) { |
| 554 | if (!path || path[0] != '/' || !segment) { |
no outgoing calls
no test coverage detected