Log debug-level data for a list of `matches`.
(
self,
matches,
message,
location=None,
query_string=None,
with_text=False,
qry=None,
)
| 592 | return {tid: ts for ts, tid in self.dictionary.items()} |
| 593 | |
| 594 | def debug_matches( |
| 595 | self, |
| 596 | matches, |
| 597 | message, |
| 598 | location=None, |
| 599 | query_string=None, |
| 600 | with_text=False, |
| 601 | qry=None, |
| 602 | ): |
| 603 | """ |
| 604 | Log debug-level data for a list of `matches`. |
| 605 | """ |
| 606 | logger_debug(message + ':', len(matches)) |
| 607 | if qry: |
| 608 | # set line early to ease debugging |
| 609 | match.set_matched_lines(matches, qry.line_by_pos) |
| 610 | |
| 611 | if not with_text: |
| 612 | for m in matches: |
| 613 | logger_debug(m) |
| 614 | else: |
| 615 | logger_debug(message + ' MATCHED TEXTS') |
| 616 | |
| 617 | from licensedcode.tracing import get_texts |
| 618 | |
| 619 | for m in matches: |
| 620 | logger_debug(m) |
| 621 | qt, it = get_texts(m) |
| 622 | logger_debug(' MATCHED QUERY TEXT:', qt) |
| 623 | logger_debug(' MATCHED RULE TEXT:', it) |
| 624 | |
| 625 | def get_spdx_id_matches( |
| 626 | self, |
no test coverage detected