in scancode/scanCode.py [0:0]
def read_config_file(file, gitignore_file):
"""Read in and validate configuration file."""
try:
print_highlight(MSG_READING_CONFIGURATION % file.name)
# Provide for sections that have simply values (not key=value)
config = configparser.ConfigParser(allow_no_value=True)
# This option prevents options from being normalized to lowercase
# by allowing the raw string in the config. to be passed through
config.optionxform = str
if sys.version_info[0] < 3:
config.readfp(file)
else:
config.read_file(file)
read_license_files(config)
read_path_inclusions(config)
read_path_exclusions(config, gitignore_file)
read_scan_options(config)
read_regex(config)
except Exception as e:
print_error(e)
return -1
return 0