in scancode/scanCode.py [0:0]
def read_path_exclusions(config, gitignore_file):
"""Read the list of paths to exclude from the scan."""
path_dict = get_config_section_dict(config, SECTION_EXCLUDE)
# vprint("path_dict: " + str(path_dict))
if path_dict is not None:
# each 'key' is an exclusion path
for key in path_dict:
key = str.strip(key)
if key is not None:
exclusion_paths.append(key)
if gitignore_file is not None:
print_highlight(MSG_READING_GITIGNORE % gitignore_file.name)
for line in gitignore_file.read().splitlines():
exclusion_paths.append(line)