Lines Matching refs:matched
188 matched = search(pattern, s)
189 if not matched:
191 start_match_index = matched.start(0)
192 end_match_index = matched.end(0)
208 # Start with the given row and trim off everything past what may be matched.
1365 matched = search(pattern, line)
1366 if matched:
1367 function_call = matched.group(1) # look inside the parens for function calls
1752 matched = (search(r'[=/-]{4,}\s*$', line[commentend:])
1754 if not matched:
1781 matched = search(r'[^<>=!\s](==|!=|\+=|-=|\*=|/=|/|\|=|&=|<<=|>>=|<=|>=|\|\||\||&&|>>|<<)[^<>=!\s]', line)
1782 if not matched:
1788 matched = search(r'[^<>=!\s](<)[^<>=!\s]([^>]|->)*$', line)
1789 if matched:
1791 'Missing spaces around %s' % matched.group(1))
1794 matched = search(r'(!\s|~\s|[\s]--[\s;]|[\s]\+\+[\s;])', line)
1795 if matched:
1797 'Extra space for operator %s' % matched.group(1))
1800 matched = search(r' (if\(|for\(|foreach\(|while\(|switch\()', line)
1801 if matched:
1803 'Missing space before ( in %s' % matched.group(1))
1810 matched = search(r'\b(?P<statement>if|for|foreach|while|switch)\s*\((?P<remainder>.*)$', line)
1811 if matched:
1812 statement = matched.group('statement')
1813 condition, rest = up_to_unmatched_closing_paren(matched.group('remainder'))
1841 matched = search(r'^\s*(?P<token1>[a-zA-Z0-9_\*&]+)\s\s+(?P<token2>[a-zA-Z0-9_\*&]+)', line)
1842 if matched:
1844 'Extra space between %s and %s' % (matched.group('token1'), matched.group('token2')))
1848 matched = match(r'\s*\w+(?<!\breturn|\bdelete)\s+(?P<pointer_operator>\*|\&)\w+', line)
1849 if matched:
1851 'Declaration has space between type name and %s in %s' % (matched.group('pointer_operator'), matched.group(0).strip()))
1855 matched = search(r'^\s*\w+\*\s+\w+', line)
1856 if matched:
1858 'Declaration has space between * and variable name in %s' % matched.group(0).strip())
2635 matched = _RE_PATTERN_INCLUDE.search(line)
2636 if not matched:
2639 include = matched.group(2)
2640 is_system = (matched.group(1) == '<')
2735 matched = _RE_PATTERN_INCLUDE.search(line)
2736 if matched:
2746 matched = search(
2748 if matched:
2756 matched.group(1))
2779 matched = match(
2785 if matched and not match(r'\s*(<.*>)?(::[a-zA-Z0-9_]+)?\s*\(([^"]|$)',
2786 matched.group(3)):
2790 (matched.group(1), matched.group(2)))
2817 matched = search(r'snprintf\s*\(([^,]*),\s*([0-9]*)\s*,', line)
2818 if matched:
2821 'to snprintf.' % (matched.group(1), matched.group(2)))
2827 matched = search(r'\b(strcpy|strcat)\b', line)
2828 if matched:
2830 'Almost always, snprintf is better than %s' % matched.group(1))
2845 matched = re.search(r'\b((?:string)?printf)\s*\(([\w.\->()]+)\)', line, re.I)
2846 if matched:
2849 % (matched.group(1), matched.group(2)))
2852 matched = search(r'memset\s*\(([^,]*),\s*([^,]*),\s*0\s*\)', line)
2853 if matched and not match(r"^''|-?[0-9]+|0x[0-9A-Fa-f]$", matched.group(2)):
2856 % (matched.group(1), matched.group(2)))
2859 matched = match(r'\s*(.+::)?(\w+) [a-z]\w*\[(.+)];', line)
2860 if (matched and matched.group(2) != 'return' and matched.group(2) != 'delete' and
2861 matched.group(3).find(']') == -1):
2865 tokens = re.split(r'\s|\+|\-|\*|\/|<<|>>]', matched.group(3))
2993 matched = match(declaration_regexp, line)
2994 if not matched:
2996 identifier = matched.group('identifier')
2997 character_after_identifier = matched.group('character_after_identifier')
3038 line = line[matched.end():]
3055 matched = search(pattern, line)
3056 if not matched:
3060 sizeof_match = match(r'.*sizeof\s*$', line[0:matched.start(1) - 1])
3066 remainder = line[matched.end(0):]
3091 (cast_type, matched.group(1)))
3233 matched = _RE_PATTERN_INCLUDE.search(clean_line)
3234 if matched:
3235 include = matched.group(2)