def collect_non_report_files(args, discovered_files):
    """Collects the source files that have no coverage reports.
    """
    excl_paths = exclude_paths(args)
    abs_root = os.path.abspath(args.root)
    non_report_files = []
    for root, dirs, files in os.walk(args.root, followlinks=args.follow_symlinks):
        dirs[:] = filter_dirs(root, dirs, excl_paths)

        for filename in files:
            if not is_source_file(args, filename):
                continue
            abs_filepath = os.path.join(os.path.abspath(root), filename)
            if is_excluded_path(args, abs_filepath):
                continue
            filepath = os.path.relpath(abs_filepath, abs_root)
            if filepath not in discovered_files:
                src_report = {}
                src_report['name'] = posix_path(filepath)
                coverage = []
                with io.open(abs_filepath, mode='rb') as fobj:
                    for _ in fobj:
                        coverage.append(None)
                    fobj.seek(0)
                    src_report['source_digest'] = hashlib.md5(fobj.read()).hexdigest()
                src_report['coverage'] = coverage
                non_report_files.append(src_report)
    return non_report_files
def collect_non_report_files ( args , discovered_files ) : excl_paths = exclude_paths ( args ) abs_root = os . path . abspath ( args . root ) non_report_files = [ ] for root , dirs , files in os . walk ( args . root , followlinks = args . follow_symlinks ) : dirs [ : ] = filter_dirs ( root , dirs , excl_paths ) for filename in files : if not is_source_file ( args , filename ) : continue abs_filepath = os . path . join ( os . path . abspath ( root ) , filename ) if is_excluded_path ( args , abs_filepath ) : continue filepath = os . path . relpath ( abs_filepath , abs_root ) if filepath not in discovered_files : src_report = { } src_report [ 'name' ] = posix_path ( filepath ) coverage = [ ] with io . open ( abs_filepath , mode = 'rb' ) as fobj : for _ in fobj : coverage . append ( None ) fobj . seek ( 0 ) src_report [ 'source_digest' ] = hashlib . md5 ( fobj . read ( ) ) . hexdigest ( ) src_report [ 'coverage' ] = coverage non_report_files . append ( src_report ) return non_report_files
Collects the source files that have no coverage reports.