lib/reek/smells/too_many_constants.rb in reek-4.2.3 vs lib/reek/smells/too_many_constants.rb in reek-4.2.4
- old
+ new
@@ -32,10 +32,10 @@
#
# Checks +klass+ for too many constants.
#
# @return [Array<SmellWarning>]
#
- def inspect(ctx)
+ def sniff(ctx)
max_allowed_constants = value(MAX_ALLOWED_CONSTANTS_KEY, ctx)
count = ctx.each_node(:casgn, IGNORED_NODES).delete_if(&:defines_module?).length
return [] if count <= max_allowed_constants