db/migrate/20150411211455_add_location_information_to_dogs_and_users.rb
Tab detected. Open
Open
add_column :users, :address, :string
- Exclude checks
Tab detected. Open
Open
add_column :dogs, :longitude, :float
- Exclude checks
Tab detected. Open
Open
add_column :users, :country, :string
- Exclude checks
Tab detected. Open
Open
add_column :users, :city, :string
- Exclude checks
Tab detected. Open
Open
add_column :users, :zipcode, :string
- Exclude checks
Tab detected. Open
Open
add_column :dogs, :latitude, :float
- Exclude checks
Missing top-level class documentation comment. Open
Open
class AddLocationInformationToDogsAndUsers < ActiveRecord::Migration
- 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
Use 2 (not -1) spaces for indentation. Open
Open
add_column :users, :address, :string
- Read upRead up
- Exclude checks
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