def _is_src(file):
    """ Returns true if the file is a source file

    Bazel allows for headers in the srcs attributes, we need to filter them out.

    Args:
        file (File): The file to check.
"""
    if file.extension in ["c", "cc", "cpp", "cxx", "C", "c++", "C++"] and \
       file.is_source:
        return True
    return False