Code Duplication    Length = 17-17 lines in 2 locations

core/build-support/lintutils.py 1 location

@@ 73-89 (lines=17) @@
70
'''.split()
71
72
73
def get_sources(source_dir, exclude_globs=[]):
74
    sources = []
75
    for directory, subdirs, basenames in os.walk(source_dir):
76
        for path in [os.path.join(directory, basename)
77
                     for basename in basenames]:
78
            # filter out non-source files
79
            if os.path.splitext(path)[1] not in _source_extensions:
80
                continue
81
82
            path = os.path.abspath(path)
83
84
            # filter out files that match the globs in the globs file
85
            if any([fnmatch(path, glob) for glob in exclude_globs]):
86
                continue
87
88
            sources.append(path)
89
    return sources
90
91
92
def stdout_pathcolonline(completed_process, filenames):

sdk/build-support/lintutils.py 1 location

@@ 73-89 (lines=17) @@
70
'''.split()
71
72
73
def get_sources(source_dir, exclude_globs=[]):
74
    sources = []
75
    for directory, subdirs, basenames in os.walk(source_dir):
76
        for path in [os.path.join(directory, basename)
77
                     for basename in basenames]:
78
            # filter out non-source files
79
            if os.path.splitext(path)[1] not in _source_extensions:
80
                continue
81
82
            path = os.path.abspath(path)
83
84
            # filter out files that match the globs in the globs file
85
            if any([fnmatch(path, glob) for glob in exclude_globs]):
86
                continue
87
88
            sources.append(path)
89
    return sources
90
91
92
def stdout_pathcolonline(completed_process, filenames):