Class: Overcommit::ConfigurationValidator
- Inherits:
-
Object
- Object
- Overcommit::ConfigurationValidator
- Defined in:
- lib/overcommit/configuration_validator.rb
Overview
Validates and normalizes a configuration.
Instance Method Summary collapse
-
#validate(config, hash, options) ⇒ Hash
Validates hash for any invalid options, normalizing where possible.
Instance Method Details
#validate(config, hash, options) ⇒ Hash
Validates hash for any invalid options, normalizing where possible.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/overcommit/configuration_validator.rb', line 15 def validate(config, hash, ) @options = .dup @log = [:logger] hash = convert_nils_to_empty_hashes(hash) ensure_hook_type_sections_exist(hash) check_hook_name_format(hash) check_hook_env(hash) check_for_missing_enabled_option(hash) unless @options[:default] check_for_too_many_processors(config, hash) check_for_verify_plugin_signatures_option(hash) hash end |