INNER CODE UNIT · Python
include_paths_with_local
ixray-team/ixray-1.6-stcop · util/includes_case_fix.py:28
include_paths_with_local = include_paths + [source_dir]
e = chardet.detect(open(source_file, 'rb').read())['encoding']
with open(source_file, 'r', encoding=e) as f:
try:
lines = f.readlines()
except:
print("ERROR reading file ", source_file, e)
raise
changed = False
for ln in range(len(lines)):
line = lines[ln]
match = REGEX_INCLUDE_FILE.match(line)
if match:
include = match.group(1) or match.group(2)
(left_delim, right_delim) = ('"', '"') if match.group(1) else ('<', '>')
found = find_in_paths(include, include_paths_with_local)
if found and found != include:
if not changed: