natydev/fitbark

View on GitHub

Showing 145 of 145 total issues

Missing top-level module documentation comment.
Open

      module ClassMethods
Severity: Minor
Found in lib/fitbark/data/shared.rb by rubocop

This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.

The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.

Example:

# bad
class Person
  # ...
end

# good
# Description/Explanation of Person class
class Person
  # ...
end

Trailing whitespace detected.
Open

    # Original attribute names from source API: 

Trailing whitespace detected.
Open

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

    "documentation_uri" => "https://www.rubydoc.info/github/natydev/fitbark/master"
Severity: Minor
Found in fitbark.gemspec by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

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?

Space between { and | missing.
Open

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

Checks that block braces have or don't have surrounding space inside them on configuration. For blocks taking parameters, it checks that the left brace has or doesn't have trailing space depending on configuration.

Example: EnforcedStyle: space (default)

# The `space` style enforces that block braces have
# surrounding space.

# bad
some_array.each {puts e}

# good
some_array.each { puts e }

Example: EnforcedStyle: no_space

# The `no_space` style enforces that block braces don't
# have surrounding space.

# bad
some_array.each { puts e }

# good
some_array.each {puts e}

Example: EnforcedStyleForEmptyBraces: no_space (default)

# The `no_space` EnforcedStyleForEmptyBraces style enforces that
# block braces don't have a space in between when empty.

# bad
some_array.each {   }
some_array.each {  }
some_array.each { }

# good
some_array.each {}

Example: EnforcedStyleForEmptyBraces: space

# The `space` EnforcedStyleForEmptyBraces style enforces that
# block braces have at least a spece in between when empty.

# bad
some_array.each {}

# good
some_array.each { }
some_array.each {  }
some_array.each {   }

Example: SpaceBeforeBlockParameters: true (default)

# The SpaceBeforeBlockParameters style set to `true` enforces that
# there is a space between `{` and `|`. Overrides `EnforcedStyle`
# if there is a conflict.

# bad
[1, 2, 3].each {|n| n * 2 }

# good
[1, 2, 3].each { |n| n * 2 }

Example: SpaceBeforeBlockParameters: true

# The SpaceBeforeBlockParameters style set to `false` enforces that
# there is no space between `{` and `|`. Overrides `EnforcedStyle`
# if there is a conflict.

# bad
[1, 2, 3].each { |n| n * 2 }

# good
[1, 2, 3].each {|n| n * 2 }

Trailing whitespace detected.
Open

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

Trailing whitespace detected.
Open

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

Line is too long. [83/80]
Open

    "documentation_uri" => "https://www.rubydoc.info/github/natydev/fitbark/master"
Severity: Minor
Found in fitbark.gemspec by rubocop

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

              "to": to,

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

            "daily_goal": goal_points.to_s,

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

Trailing whitespace detected.
Open

      # inside Client object, it retrieve all dogs having friendship 

Trailing whitespace detected.
Open

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

Missing top-level module documentation comment.
Open

module Fitbark
Severity: Minor
Found in lib/fitbark.rb by rubocop

This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.

The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.

Example:

# bad
class Person
  # ...
end

# good
# Description/Explanation of Person class
class Person
  # ...
end

Line is too long. [81/80]
Open

      # Fitbark::Handler::V2::SimilarDogsStats define method *similar_dogs_stats*

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

              "resolution": format_resolution(res)

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

Place the . on the next line, together with the method name.
Open

          json_response['dog_relations'].
Severity: Minor
Found in lib/fitbark/handler/v2/own_dogs.rb by rubocop

This cop checks the . position in multi-line method calls.

Example: EnforcedStyle: leading (default)

# bad
something.
  mehod

# good
something
  .method

Example: EnforcedStyle: trailing

# bad
something
  .method

# good
something.
  mehod

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

            "dog": {
Severity
Category
Status
Source
Language