def self.load_options line_options
custom_location = line_options[:config_file]
quiet = line_options[:quiet]
app_path = line_options[:app_path]
if config = config_file(custom_location, app_path)
require 'date'
self.load_brakeman_dependency 'safe_yaml/load'
options = SafeYAML.load_file config, :deserialize_symbols => true
if options
options.each { |k, v| options[k] = Set.new v if v.is_a? Array }
options.keys.select {|k| k.is_a? String}.map {|k| k.to_sym }.each {|k| options[k] = options[k.to_s]; options.delete(k.to_s) }
unless line_options[:allow_check_paths_in_config]
if options.include? :additional_checks_path
options.delete :additional_checks_path
notify "[Notice] Ignoring additional check paths in config file. Use --allow-check-paths-in-config to allow" unless (options[:quiet] || quiet)
end
end
notify "[Notice] Using configuration in #{config}" unless (options[:quiet] || quiet)
options
else
notify "[Notice] Empty configuration file: #{config}" unless quiet
{}
end
else
{}
end
end