Showing 145 of 145 total issues
Fitbark::Data::DogInfo#breed2 has the name 'breed2' Open
def breed2
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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": {
- Exclude checks
Use 2 (not 0) spaces for indenting an expression spanning multiple lines. Open
select{|h| h['status'].upcase == 'OWNER'}.map do |rel|
- Read upRead up
- Exclude checks
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
- Exclude checks
Use casecmp
instead of upcase ==
. Open
select{|h| h['status'].upcase == 'OWNER'}.map do |rel|
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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,
- Exclude checks
Space missing to the left of {. Open
select{|h| h['status'].upcase == 'FRIEND'}.map do |rel|
- Read upRead up
- Exclude checks
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)}")
- Read upRead up
- Exclude checks
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,
- Exclude checks
Trailing whitespace detected. Open
# Original attribute names from source API:
- Exclude checks
Line is too long. [89/80] Open
spec.description = 'Wrapper for FitBark API: It provides simple methods to handle ' \
- Exclude checks
Trailing whitespace detected. Open
# Original attribute names from source API:
- Exclude checks
Trailing whitespace detected. Open
# - *first_name*
- Exclude checks
Trailing whitespace detected. Open
# Original attribute names from source API:
- Exclude checks
unexpected token tRCURLY
(Using Ruby 2.1 parser; configure using TargetRubyVersion
parameter, under AllCops
) Open
}
- Exclude checks
unexpected token $end
(Using Ruby 2.1 parser; configure using TargetRubyVersion
parameter, under AllCops
) Open
- Exclude checks