Code Duplication    Length = 18-18 lines in 2 locations

sdk/build-support/lintutils.py 1 location

@@ 92-109 (lines=18) @@
89
    return sources
90
91
92
def stdout_pathcolonline(completed_process, filenames):
93
    """
94
    given a completed process which may have reported some files as problematic
95
    by printing the path name followed by ':' then a line number, examine
96
    stdout and return the set of actually reported file names
97
    """
98
    returncode, stdout, stderr = completed_process
99
    bfilenames = set()
100
    for filename in filenames:
101
        bfilenames.add(filename.encode('utf-8') + b':')
102
    problem_files = set()
103
    for line in stdout.splitlines():
104
        for filename in bfilenames:
105
            if line.startswith(filename):
106
                problem_files.add(filename.decode('utf-8'))
107
                bfilenames.remove(filename)
108
                break
109
    return problem_files, stdout
110
111

core/build-support/lintutils.py 1 location

@@ 92-109 (lines=18) @@
89
    return sources
90
91
92
def stdout_pathcolonline(completed_process, filenames):
93
    """
94
    given a completed process which may have reported some files as problematic
95
    by printing the path name followed by ':' then a line number, examine
96
    stdout and return the set of actually reported file names
97
    """
98
    returncode, stdout, stderr = completed_process
99
    bfilenames = set()
100
    for filename in filenames:
101
        bfilenames.add(filename.encode('utf-8') + b':')
102
    problem_files = set()
103
    for line in stdout.splitlines():
104
        for filename in bfilenames:
105
            if line.startswith(filename):
106
                problem_files.add(filename.decode('utf-8'))
107
                bfilenames.remove(filename)
108
                break
109
    return problem_files, stdout
110
111