lib/cc/config/validation/engine_validator.rb in codeclimate-0.70.1 vs lib/cc/config/validation/engine_validator.rb in codeclimate-0.70.2

- old
+ new

@@ -44,11 +44,11 @@ validate_key_type("enabled", [TrueClass, FalseClass]) validate_key_type("channel", String) validate_key_type("config", [String, Hash]) validate_key_type("exclude_patterns", Array) if legacy? - validate_key_type("exclude_paths", [Array, String]) + validate_exclude_paths end validate_checks validate_exclude_fingerprints @@ -72,9 +72,16 @@ data.fetch("checks", {}).each do |_check_name, check_data| validator = CheckValidator.new(check_data) errors.push(*validator.errors) warnings.push(*validator.warnings) + end + end + + def validate_exclude_paths + validate_key_type("exclude_paths", [Array, String]) + if data.key?("exclude_paths") + warnings << "'exclude_paths' has been deprecated, please use 'exclude_patterns' instead" end end def validate_exclude_fingerprints validate_key_type("exclude_fingerprints", Array)