Method: Overcommit::ConfigurationLoader#load_repo_config

Defined in:
lib/overcommit/configuration_loader.rb

#load_repo_configOvercommit::Configuration

Loads and returns the configuration for the repository we’re running in.



52
53
54
55
56
57
58
59
60
61
# File 'lib/overcommit/configuration_loader.rb', line 52

def load_repo_config
  overcommit_yml = File.join(Overcommit::Utils.repo_root,
                             Overcommit::CONFIG_FILE_NAME)

  if File.exist?(overcommit_yml)
    load_file(overcommit_yml)
  else
    self.class.default_configuration
  end
end