natydev/fitbark

View on GitHub

Showing 145 of 145 total issues

Fitbark::Data::DogInfo#breed2 has the name 'breed2'
Open

      def breed2
Severity: Minor
Found in lib/fitbark/data/dog_info.rb by reek

An Uncommunicative Method Name is a method name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

Fitbark::Handler::V2 has the name 'V2'
Open

    module V2
Severity: Minor
Found in lib/fitbark/handler/v2/friend_dogs.rb by reek

An Uncommunicative Module Name is a module name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

Fitbark::Handler::V2 has the name 'V2'
Open

    module V2

An Uncommunicative Module Name is a module name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

Fitbark::Handler::V2 has the name 'V2'
Open

    module V2
Severity: Minor
Found in lib/fitbark/handler/v2/user_info.rb by reek

An Uncommunicative Module Name is a module name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

unexpected token tCOLON (Using Ruby 2.1 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

            "activity_series": {

Use 2 (not 0) spaces for indenting an expression spanning multiple lines.
Open

          select{|h| h['status'].upcase == 'OWNER'}.map do |rel|
Severity: Minor
Found in lib/fitbark/handler/v2/own_dogs.rb by rubocop

This cop checks the indentation of the method name part in method calls that span more than one line.

Example: EnforcedStyle: aligned

# bad
while myvariable
.b
  # do something
end

# good
while myvariable
      .b
  # do something
end

# good
Thing.a
     .b
     .c

Example: EnforcedStyle: indented

# good
while myvariable
  .b

  # do something
end

Example: EnforcedStyle: indentedrelativeto_receiver

# good
while myvariable
        .a
        .b

  # do something
end

# good
myvariable = Thing
               .a
               .b
               .c

unexpected token tCOLON (Using Ruby 2.1 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

              "to": to

Use casecmp instead of upcase ==.
Open

          select{|h| h['status'].upcase == 'OWNER'}.map do |rel|
Severity: Minor
Found in lib/fitbark/handler/v2/own_dogs.rb by rubocop

This cop identifies places where a case-insensitive string comparison can better be implemented using casecmp.

Example:

# bad
str.downcase == 'abc'
str.upcase.eql? 'ABC'
'abc' == str.downcase
'ABC'.eql? str.upcase
str.downcase == str.downcase

# good
str.casecmp('ABC').zero?
'abc'.casecmp(str).zero?

When using method_missing, define respond_to_missing?.
Open

    def method_missing(method, **args)
      if respond_to?(method)
        klass_handler(method).new(token: token, opts: args).response
      else
        super
Severity: Minor
Found in lib/fitbark/client.rb by rubocop

This cop checks for the presence of method_missing without also defining respond_to_missing? and falling back on super.

Example:

#bad
def method_missing(name, *args)
  # ...
end

#good
def respond_to_missing?(name, include_private)
  # ...
end

def method_missing(name, *args)
  # ...
  super
end

unexpected token tCOLON (Using Ruby 2.1 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

              "from": from,

Space missing to the left of {.
Open

          select{|h| h['status'].upcase == 'FRIEND'}.map do |rel|

Checks that block braces have or don't have a space before the opening brace depending on configuration.

Example:

# bad
foo.map{ |a|
  a.bar.to_s
}

# good
foo.map { |a|
  a.bar.to_s
}

The use of eval is a serious security risk.
Open

      eval("#{PREFIX_NAME_HANDLER}#{camel(handler.to_s)}")
Severity: Minor
Found in lib/fitbark/client.rb by rubocop

This cop checks for the use of Kernel#eval and Binding#eval.

Example:

# bad

eval(something)
binding.eval(something)

unexpected token tCOLON (Using Ruby 2.1 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

              "from": from,

Trailing whitespace detected.
Open

    # Original attribute names from source API:  
Severity: Minor
Found in lib/fitbark/data/activity_level.rb by rubocop

Line is too long. [89/80]
Open

  spec.description   = 'Wrapper for FitBark API: It provides simple methods to handle ' \
Severity: Minor
Found in fitbark.gemspec by rubocop

Trailing whitespace detected.
Open

    # Original attribute names from source API:  
Severity: Minor
Found in lib/fitbark/data/breed.rb by rubocop

Trailing whitespace detected.
Open

    # - *first_name*  
Severity: Minor
Found in lib/fitbark/data/user_preview.rb by rubocop

Trailing whitespace detected.
Open

    # Original attribute names from source API: 
Severity: Minor
Found in lib/fitbark/data/dog_relation.rb by rubocop

unexpected token tRCURLY (Using Ruby 2.1 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

            }

unexpected token $end (Using Ruby 2.1 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

Severity
Category
Status
Source
Language