lib/reek/smells/uncommunicative_variable_name.rb
#
# Checks the given +context+ for uncommunicative names.
#
# @return [Array<SmellWarning>]
#
Checks the given +context+ for uncommunicative names.
Checks the given + context + for uncommunicative names .
def examine_context(ctx)
        @reject_names = value(REJECT_KEY, ctx, DEFAULT_REJECT_SET)
        @accept_names = value(ACCEPT_KEY, ctx, DEFAULT_ACCEPT_SET)
        variable_names(ctx.exp).select do |name, _lines|
          bad_name?(name, ctx)
        end.map do |name, lines|
          SmellWarning.new(self,
                           context: ctx.full_name,
                           lines: lines,
                           message: "has the variable name '#{name}'",
                           parameters: { VARIABLE_NAME_KEY => name.to_s })
        end
      end
def examine_context ( ctx ) @reject_names = value ( REJECT_KEY , ctx , DEFAULT_REJECT_SET ) @accept_names = value ( ACCEPT_KEY , ctx , DEFAULT_ACCEPT_SET ) variable_names ( ctx . exp ) . select do | name , _lines | bad_name? ( name , ctx ) end . map do | name , lines | SmellWarning . new ( self , context : ctx . full_name , lines : lines , message : "has the variable name '#{name}'" , parameters : { VARIABLE_NAME_KEY => name . to_s } ) end end
Checks the given +context+ for uncommunicative names.
Checks the given + context + for uncommunicative names .
None
Array<SmellWarning>
ctx
<not_specific>