Showing 133 of 133 total issues
Missing top-level class documentation comment. Open
class Client
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
%w
-literals should be delimited by [
and ]
. Open
%w(hotelBasicInfo hotelRatingInfo hotelDetailInfo hotelFacilitiesInfo hotelPolicyInfo hotelOtherInfo)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop enforces the consistent usage of %
-literal delimiters.
Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.
Example:
# Style/PercentLiteralDelimiters:
# PreferredDelimiters:
# default: '[]'
# '%i': '()'
# good
%w[alpha beta] + %i(gamma delta)
# bad
%W(alpha #{beta})
# bad
%I(alpha beta)
Align the parameters of a method call if they span more than one line. Open
:smallImageUrl, :mediumImageUrl, :largeImageUrl,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Here we check if the parameters on a multi-line method call or definition are aligned.
Example: EnforcedStyle: withfirstparameter (default)
# good
foo :bar,
:baz
# bad
foo :bar,
:baz
Example: EnforcedStyle: withfixedindentation
# good
foo :bar,
:baz
# bad
foo :bar,
:baz
Extra empty line detected at class body beginning. Open
def self.large_categories
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cops checks if empty lines around the bodies of classes match the configuration.
Example: EnforcedStyle: empty_lines
# good
class Foo
def bar
# ...
end
end
Example: EnforcedStyle: emptylinesexcept_namespace
# good
class Foo
class Bar
# ...
end
end
Example: EnforcedStyle: emptylinesspecial
# good
class Foo
def bar; end
end
Example: EnforcedStyle: noemptylines (default)
# good
class Foo
def bar
# ...
end
end
Align the parameters of a method call if they span more than one line. Open
:recipeIndication, :recipeCost,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Here we check if the parameters on a multi-line method call or definition are aligned.
Example: EnforcedStyle: withfirstparameter (default)
# good
foo :bar,
:baz
# bad
foo :bar,
:baz
Example: EnforcedStyle: withfixedindentation
# good
foo :bar,
:baz
# bad
foo :bar,
:baz
Line is too long. [115/80] Open
attribute :carrier, :golfCourseId, :golfCourseName, :golfCourseAbbr, :golfCourseNameKana, :golfCourseCaption,
- Create a ticketCreate a ticket
- Exclude checks
Align the parameters of a method call if they span more than one line. Open
:smallImageUrl, :mediumImageUrl,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Here we check if the parameters on a multi-line method call or definition are aligned.
Example: EnforcedStyle: withfirstparameter (default)
# good
foo :bar,
:baz
# bad
foo :bar,
:baz
Example: EnforcedStyle: withfixedindentation
# good
foo :bar,
:baz
# bad
foo :bar,
:baz
Line is too long. [93/80] Open
@params['brothers'] ||= self.class.search(self.class.genre_id_key => id).first.brothers
- Create a ticketCreate a ticket
- Exclude checks
Align the parameters of a method call if they span more than one line. Open
:makerPageUrlPC, :makerPageUrlMobile,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Here we check if the parameters on a multi-line method call or definition are aligned.
Example: EnforcedStyle: withfirstparameter (default)
# good
foo :bar,
:baz
# bad
foo :bar,
:baz
Example: EnforcedStyle: withfixedindentation
# good
foo :bar,
:baz
# bad
foo :bar,
:baz
Line is too long. [91/80] Open
@params['parents'] ||= self.class.search(self.class.genre_id_key => id).first.parents
- Create a ticketCreate a ticket
- Exclude checks
Line is too long. [90/80] Open
attribute :categoryId, :categoryName, :categoryUrl, :parentCategoryId, :categoryType
- Create a ticketCreate a ticket
- Exclude checks
Line is too long. [105/80] Open
attribute :golfCourseId, :golfCourseName, :golfCourseAbbr, :golfCourseNameKana, :golfCourseCaption,
- Create a ticketCreate a ticket
- Exclude checks
Missing top-level class documentation comment. Open
class Plan < Resource
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Replace class var @@repository with a class instance var. Open
@@repository ||= Hash.new { |h, k| h[k] = {} }
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.
Line is too long. [83/80] Open
:minPrice, :salesMinPrice, :usedExcludeMinPrice, :usedExcludeSalesMinPrice,
- Create a ticketCreate a ticket
- Exclude checks
Missing top-level class documentation comment. Open
class Hotel < RakutenWebService::Travel::Resource
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Missing top-level class documentation comment. Open
class Error < StandardError
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Missing top-level class documentation comment. Open
class Configuration
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Use each_with_object
instead of inject
. Open
params.inject({}) do |h, (k, v)|
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop looks for inject / reduce calls where the passed in object is returned at the end and so could be replaced by eachwithobject without the need to return the object at the end.
However, we can't replace with eachwithobject if the accumulator parameter is assigned to within the block.
Example:
# bad
[1, 2].inject({}) { |a, e| a[e] = e; a }
# good
[1, 2].each_with_object({}) { |e, a| a[e] = e }
Line is too long. [117/80] Open
:information, :highway, :ic, :icDistance, :latitude, :longitude, :postalCode, :address, :telephoneNo,
- Create a ticketCreate a ticket
- Exclude checks