lib/overcommit/configuration_validator.rb
# Prints a warning if there are any hooks listed in the configuration
# without `enabled` explicitly set.
Prints a warning if there are any hooks listed in the configuration
without `enabled` explicitly set.
Prints a warning if there are any hooks listed in the configuration without ` enabled ` explicitly set .
def check_for_missing_enabled_option(hash)
      return unless @log
      any_warnings = false
      Overcommit::Utils.supported_hook_type_classes.each do |hook_type|
        hash.fetch(hook_type) { {} }.each do |hook_name, hook_config|
          next if hook_name == 'ALL'
          if hook_config['enabled'].nil?
            @log.warning "#{hook_type}::#{hook_name} hook does not explicitly " \
                         'set `enabled` option in .overcommit.yml'
            any_warnings = true
          end
        end
      end
      @log.newline if any_warnings
    end
def check_for_missing_enabled_option ( hash ) return unless @log any_warnings = false Overcommit :: Utils . supported_hook_type_classes . each do | hook_type | hash . fetch ( hook_type ) { { } } . each do | hook_name , hook_config | next if hook_name == 'ALL' if hook_config [ 'enabled' ] . nil? @log . warning "#{hook_type}::#{hook_name} hook does not explicitly " 'set `enabled` option in .overcommit.yml' any_warnings = true end end end @log . newline if any_warnings end
Prints a warning if there are any hooks listed in the configuration
without `enabled` explicitly set.
Prints a warning if there are any hooks listed in the configuration without ` enabled ` explicitly set .
hash
<not_specific>