(content)
| 724 | |
| 725 | |
| 726 | def except_all_missing(content): |
| 727 | # This is not perfect, won't detect C++ custom types, but will find |
| 728 | # the built-in types, templates and pointers. |
| 729 | patterns = list() |
| 730 | patterns.append( |
| 731 | r"\bcp?def\s+" |
| 732 | "((int|short|long|double|char|unsigned|float|double|cpp_bool" |
| 733 | "|cpp_string|cpp_wstring|uintptr_t|void" |
| 734 | "|int32|uint32|int64|uint64" |
| 735 | "|int32_t|uint32_t|int64_t|uint64_t" |
| 736 | "|CefString)\s+)+" |
| 737 | "\w+\([^)]*\)\s*(with\s+(gil|nogil))?\s*:") |
| 738 | patterns.append( |
| 739 | r"\bcp?def\s+" |
| 740 | # A template ends with bracket: CefRefPtr[CefBrowser] |
| 741 | # or a pointer ends with asterisk: CefBrowser* |
| 742 | "[^\s]+[\]*]\s+" |
| 743 | "\w+\([^)]*\)\s*(with\s+(gil|nogil))?\s*:") |
| 744 | patterns.append( |
| 745 | r"\bcp?def\s+" |
| 746 | # A reference, eg. CefString& |
| 747 | "[^\s]+&\s+" |
| 748 | "\w+\([^)]*\)\s*(with\s+(gil|nogil))?\s*:") |
| 749 | |
| 750 | match = None |
| 751 | for pattern in patterns: |
| 752 | match = re.search(pattern, content) |
| 753 | if match: |
| 754 | break |
| 755 | |
| 756 | if match: |
| 757 | lineNumber = (content.count("\n", 0, match.start()) + 1) |
| 758 | return lineNumber |
| 759 | |
| 760 | |
| 761 | def build_cefpython_module(): |
no outgoing calls
no test coverage detected