You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: too_many_constants.rb
    path of file: ./repos/reek/lib/reek/smell_detectors
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require_relative 'base_detector'

module Reek
  module SmellDete
    
      def sniff
        count = context.local_nodes(:casgn).count { |it| !it.defines_module? }

        return [] if count <= max_allowed_constants

        build_smell_warning(count)
      end