dblandin/motion-blitz

View on GitHub

Showing 58 of 58 total issues

Assignment Branch Condition size for actions is too high. [23/15]
Open

  def actions
    [ lambda { Motion::Blitz.show },
      lambda { Motion::Blitz.show('Hi there!') },
      lambda { Motion::Blitz.progress(progress) },
      lambda { Motion::Blitz.progress(increment_progress) },
Severity: Minor
Found in app/motion_blitz_demo_manager.rb by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Unused method argument - didSelectRowAtIndexPath.
Open

  def tableView(table_view, didSelectRowAtIndexPath: index_path)
Severity: Minor
Found in app/motion_blitz_demo_manager.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Use snake_case for variable names.
Open

  def tableView(table_view, numberOfRowsInSection: section)
Severity: Minor
Found in app/motion_blitz_demo_manager.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Unused method argument - application. If it's necessary, use _ or _application as an argument name to indicate that it won't be used. You can also write as application(*) if you want the method to accept any arguments but don't care about them.
Open

  def application(application, didFinishLaunchingWithOptions: launch_options)
Severity: Minor
Found in app/app_delegate.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Missing top-level class documentation comment.
Open

  class Blitz
Severity: Minor
Found in lib/project/motion-blitz.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

%q-literals should be delimited by ( and ).
Open

  gem.summary       = %q{RubyMotion wrapper for SVProgressHUD}
Severity: Minor
Found in motion-blitz.gemspec by rubocop

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)

Use snake_case for method names.
Open

  def viewDidLoad
Severity: Minor
Found in app/controllers/view_controller.rb by rubocop

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

The name of this source file (motion-blitz.rb) should use snake_case.
Open

unless defined?(Motion::Project::Config)
Severity: Minor
Found in lib/motion-blitz.rb by rubocop

This cop makes sure that Ruby source files have snake_case names. Ruby scripts (i.e. source files with a shebang in the first line) are ignored.

Example:

# bad
lib/layoutManager.rb

anything/usingCamelCase

# good
lib/layout_manager.rb

anything/using_snake_case.rake

The name of this source file (motion-blitz.rb) should use snake_case.
Open

module Motion
Severity: Minor
Found in lib/project/motion-blitz.rb by rubocop

This cop makes sure that Ruby source files have snake_case names. Ruby scripts (i.e. source files with a shebang in the first line) are ignored.

Example:

# bad
lib/layoutManager.rb

anything/usingCamelCase

# good
lib/layout_manager.rb

anything/using_snake_case.rake

Use snake_case for method names.
Open

  def initWithFrame(frame, style: style)
Severity: Minor
Found in app/motion_blitz_demo.rb by rubocop

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

1 trailing blank lines detected.
Open

Severity: Minor
Found in Gemfile by rubocop

Unnecessary utf-8 encoding comment.
Open

# -*- encoding: utf-8 -*-
Severity: Minor
Found in motion-blitz.gemspec by rubocop

Use snake_case for method names.
Open

  def tableView(table_view, numberOfRowsInSection: section)
Severity: Minor
Found in app/motion_blitz_demo_manager.rb by rubocop

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

Use the -> { ... } lambda literal syntax for single line lambdas.
Open

      lambda { Motion::Blitz.progress(decrement_progress) },
Severity: Minor
Found in app/motion_blitz_demo_manager.rb by rubocop

This cop (by default) checks for uses of the lambda literal syntax for single line lambdas, and the method call syntax for multiline lambdas. It is configurable to enforce one of the styles for both single line and multiline lambdas as well.

Example: EnforcedStyle: linecountdependent (default)

# bad
f = lambda { |x| x }
f = ->(x) do
      x
    end

# good
f = ->(x) { x }
f = lambda do |x|
      x
    end

Example: EnforcedStyle: lambda

# bad
f = ->(x) { x }
f = ->(x) do
      x
    end

# good
f = lambda { |x| x }
f = lambda do |x|
      x
    end

Example: EnforcedStyle: literal

# bad
f = lambda { |x| x }
f = lambda do |x|
      x
    end

# good
f = ->(x) { x }
f = ->(x) do
      x
    end

Prefer $LOAD_PATH over $:.
Open

$:.unshift('/Library/RubyMotion/lib')
Severity: Minor
Found in Rakefile by rubocop

Unused method argument - table_view. If it's necessary, use _ or _table_view as an argument name to indicate that it won't be used. You can also write as numberOfSectionsInTableView(*) if you want the method to accept any arguments but don't care about them.
Open

  def numberOfSectionsInTableView(table_view)
Severity: Minor
Found in app/motion_blitz_demo_manager.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Use the -> { ... } lambda literal syntax for single line lambdas.
Open

      lambda { Motion::Blitz.error },
Severity: Minor
Found in app/motion_blitz_demo_manager.rb by rubocop

This cop (by default) checks for uses of the lambda literal syntax for single line lambdas, and the method call syntax for multiline lambdas. It is configurable to enforce one of the styles for both single line and multiline lambdas as well.

Example: EnforcedStyle: linecountdependent (default)

# bad
f = lambda { |x| x }
f = ->(x) do
      x
    end

# good
f = ->(x) { x }
f = lambda do |x|
      x
    end

Example: EnforcedStyle: lambda

# bad
f = ->(x) { x }
f = ->(x) do
      x
    end

# good
f = lambda { |x| x }
f = lambda do |x|
      x
    end

Example: EnforcedStyle: literal

# bad
f = lambda { |x| x }
f = lambda do |x|
      x
    end

# good
f = ->(x) { x }
f = ->(x) do
      x
    end

%q-literals should be delimited by ( and ).
Open

  gem.description   = %q{RubyMotion wrapper for SVProgressHUD}
Severity: Minor
Found in motion-blitz.gemspec by rubocop

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)

Use %q only for strings that contain both single quotes and double quotes.
Open

  gem.description   = %q{RubyMotion wrapper for SVProgressHUD}
Severity: Minor
Found in motion-blitz.gemspec by rubocop

Use snake_case for method names.
Open

  def tableView(table_view, cellForRowAtIndexPath: index_path)
Severity: Minor
Found in app/motion_blitz_demo_manager.rb by rubocop

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
Severity
Category
Status
Source
Language