lib/overcommit/configuration_validator.rb in overcommit-0.28.0 vs lib/overcommit/configuration_validator.rb in overcommit-0.29.0

- old
+ new

@@ -13,10 +13,11 @@ @log = options[:logger] hash = convert_nils_to_empty_hashes(hash) ensure_hook_type_sections_exist(hash) check_for_missing_enabled_option(hash) unless @options[:default] + check_for_verify_plugin_signatures_option(hash) hash end private @@ -65,8 +66,21 @@ end end end @log.newline if any_warnings + end + + # Prints a warning if the `verify_plugin_signatures` option is used instead + # of the new `verify_signatures` option. + def check_for_verify_plugin_signatures_option(hash) + return unless @log + + if hash.key?('verify_plugin_signatures') + @log.warning '`verify_plugin_signatures` has been renamed to ' \ + '`verify_signatures`. Defaulting to verifying signatures.' + @log.warning "See change log at #{REPO_URL}/blob/v0.29.0/CHANGELOG.md for details." + @log.newline + end end end end