app/motion_blitz_demo.rb
Use snake_case for method names. Open
Open
def initWithFrame(frame, style: style)
- Read upRead up
- Exclude checks
This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.
Example: EnforcedStyle: snake_case (default)
# bad
def fooBar; end
# good
def foo_bar; end
Example: EnforcedStyle: camelCase
# bad
def foo_bar; end
# good
def fooBar; end
Circular argument reference - style
. Open
Open
def initWithFrame(frame, style: style)
- Read upRead up
- Exclude checks
This cop checks for circular argument references in optional keyword arguments and optional ordinal arguments.
This cop mirrors a warning produced by MRI since 2.2.
Example:
# bad
def bake(pie: pie)
pie.heat_up
end
Example:
# good
def bake(pie:)
pie.refrigerate
end
Example:
# good
def bake(pie: self.pie)
pie.feed_to(user)
end
Example:
# bad
def cook(dry_ingredients = dry_ingredients)
dry_ingredients.reduce(&:+)
end
Example:
# good
def cook(dry_ingredients = self.dry_ingredients)
dry_ingredients.combine
end
Missing top-level class documentation comment. Open
Open
class MotionBlitzDemo < UITableView
- Read upRead up
- 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
Line is too long. [88/80] Open
Open
table_view.registerClass(UITableViewCell, forCellReuseIdentifier: 'BlitzDemoCell')
- Exclude checks