angelakuo/citydogshare

View on GitHub
db/migrate/20150307174800_add_facebook_info_to_users.rb

Summary

Maintainability
A
0 mins
Test Coverage

Method has too many lines. [11/10]
Open

    def change
        add_column :users, :last_name, :string
        add_column :users, :first_name, :string
        add_column :users, :location, :string
        add_column :users, :gender, :string

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Tab detected.
Open

        add_column :users, :phone_number, :string

Tab detected.
Open

        add_column :users, :description, :string

Tab detected.
Open

        add_column :users, :first_name, :string

Tab detected.
Open

        add_column :users, :gender, :string

Tab detected.
Open

        add_column :users, :image, :string

Final newline missing.
Open

end

Tab detected.
Open

    end

Tab detected.
Open

        add_column :users, :availability, :string

Tab detected.
Open

        remove_column :users, :provider

Use 2 (not 1) spaces for indentation.
Open

        add_column :users, :last_name, :string

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Missing top-level class documentation comment.
Open

class AddFacebookInfoToUsers < ActiveRecord::Migration

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

Tab detected.
Open

        add_column :users, :email, :string

Use 2 (not 1) spaces for indentation.
Open

    def change

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Tab detected.
Open

    def change

Tab detected.
Open

        add_column :users, :last_name, :string

Tab detected.
Open

        add_column :users, :location, :string

Tab detected.
Open

        add_column :users, :status, :string

There are no issues that match your filters.

Category
Status