tools/clang_tidy.py
def filter_files(files, file_patterns, verbose):
    """Returns all files that match any of the patterns."""
    filtered = []
    for file in files:
        has_match = False
        for pattern in file_patterns:
            if pattern.search(file):
                filtered.append(file)
                has_match = True
        if not has_match and verbose:
            message = "{} does not match any ".format(file)
            message += "file pattern in {{{}}}".format(', '.join(map(str, file_patterns)))
            print(message)
    return filtered
Returns all files that match any of the patterns.
Returns all files that match any of the patterns.
Returns all files that match any of the patterns .
def filter_files(files, file_patterns, verbose):
    filtered = []
    for file in files:
        has_match = False
        for pattern in file_patterns:
            if pattern.search(file):
                filtered.append(file)
                has_match = True
        if not has_match and verbose:
            message = "{} does not match any ".format(file)
            message += "file pattern in {{{}}}".format(', '.join(map(str, file_patterns)))
            print(message)
    return filtered
def filter_files ( files , file_patterns , verbose ) : filtered = [ ] for file in files : has_match = False for pattern in file_patterns : if pattern . search ( file ) : filtered . append ( file ) has_match = True if not has_match and verbose : message = "{} does not match any " . format ( file ) message += "file pattern in {{{}}}" . format ( ', ' . join ( map ( str , file_patterns ) ) ) print ( message ) return filtered
Returns all files that match any of the patterns.
Returns all files that match any of the patterns .
"""Returns all files that match any of the patterns."""
files
file_patterns
verbose