Showing 303 of 303 total issues
Space inside { missing. Open
Open
validates :notes, length: {maximum: MAXIMUM_CHARACTERS}
- Read upRead up
- Exclude checks
Checks that braces used for hash literals have or don't have surrounding space depending on configuration.
Example: EnforcedStyle: space
# The `space` style enforces that hash literals have
# surrounding space.
# bad
h = {a: 1, b: 2}
# good
h = { a: 1, b: 2 }
Example: EnforcedStyle: no_space
# The `no_space` style enforces that hash literals have
# no surrounding space.
# bad
h = { a: 1, b: 2 }
# good
h = {a: 1, b: 2}
Example: EnforcedStyle: compact
# The `compact` style normally requires a space inside
# hash braces, with the exception that successive left
# braces or right braces are collapsed together in nested hashes.
# bad
h = { a: { b: 2 } }
# good
h = { a: { b: 2 }}
Space inside parentheses detected. Open
Open
@location = Location.find( params[ :id ])
- Read upRead up
- Exclude checks
Checks for spaces inside ordinary round parentheses.
Example:
# bad
f( 3)
g = (a + 3 )
# good
f(3)
g = (a + 3)
Space inside parentheses detected. Open
Open
saved_state && ( saved_state.include?('colony') || active?)
- Read upRead up
- Exclude checks
Checks for spaces inside ordinary round parentheses.
Example:
# bad
f( 3)
g = (a + 3 )
# good
f(3)
g = (a + 3)
Line is too long. [96/80] Open
Open
devise_parameter_sanitizer.permit(:sign_up, keys: [:username, :role, :bio, :avatar, :purrs])
- Exclude checks
Inconsistent indentation detected. Open
Open
MAXIMUM_USERNAME_LENGTH = 20
- Read upRead up
- Exclude checks
This cops checks for inconsistent indentation.
Example:
class A
def test
puts 'hello'
puts 'world'
end
end
Line is too long. [83/80] Open
Open
redirect_to treatment_entries_path(suffering_id: @treatment_entry.suffering_id)
- Exclude checks
Tab detected. Open
Open
- Exclude checks
Line is too long. [83/80] Open
Open
redirect_to treatment_entries_path(suffering_id: @treatment_entry.suffering_id)
- Exclude checks
Tab detected. Open
Open
enum priority: [ :low, :medium, :high ]
- Exclude checks
Trailing whitespace detected. Open
Open
- Exclude checks
Space inside parentheses detected. Open
Open
@location = Location.new( location_params )
- Read upRead up
- Exclude checks
Checks for spaces inside ordinary round parentheses.
Example:
# bad
f( 3)
g = (a + 3 )
# good
f(3)
g = (a + 3)
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
record.errors[:date] << "Date must be in the past"
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Line is too long. [91/80] Open
Open
last_payment_date: Date.today, start_date: Date.today, user: current_user, cat: cat)
- Exclude checks
Line is too long. [138/80] Open
Open
sufferings_attributes: [:id, :illness_id, :cat_id, :diagnosis_date, :notes, :chronic, :status, :_destroy])
- Exclude checks
Inconsistent indentation detected. Open
Open
validates :description, length: {maximum: MAXIMUM_DESCRIPTION_LENGTH}
- Read upRead up
- Exclude checks
This cops checks for inconsistent indentation.
Example:
class A
def test
puts 'hello'
puts 'world'
end
end
Inconsistent indentation detected. Open
Open
validates :email, uniqueness: true
- Read upRead up
- Exclude checks
This cops checks for inconsistent indentation.
Example:
class A
def test
puts 'hello'
puts 'world'
end
end
Space inside parentheses detected. Open
Open
redirect_to (illness_path( params[ :id ] ))
- Read upRead up
- Exclude checks
Checks for spaces inside ordinary round parentheses.
Example:
# bad
f( 3)
g = (a + 3 )
# good
f(3)
g = (a + 3)
Do not use space inside reference brackets. Open
Open
redirect_to (illness_path( params[ :id ] ))
- Read upRead up
- Exclude checks
Checks that reference brackets have or don't have surrounding space depending on configuration.
Example: EnforcedStyle: no_space (default)
# The `no_space` style enforces that reference brackets have
# no surrounding space.
# bad
hash[ :key ]
array[ index ]
# good
hash[:key]
array[index]
Example: EnforcedStyle: space
# The `space` style enforces that reference brackets have
# surrounding space.
# bad
hash[:key]
array[index]
# good
hash[ :key ]
array[ index ]
Tab detected. Open
Open
validates :name, :description, :priority, :treatment, presence: true
- Exclude checks
Do not use space inside reference brackets. Open
Open
@illness = Illness.find( params[ :id ])
- Read upRead up
- Exclude checks
Checks that reference brackets have or don't have surrounding space depending on configuration.
Example: EnforcedStyle: no_space (default)
# The `no_space` style enforces that reference brackets have
# no surrounding space.
# bad
hash[ :key ]
array[ index ]
# good
hash[:key]
array[index]
Example: EnforcedStyle: space
# The `space` style enforces that reference brackets have
# surrounding space.
# bad
hash[:key]
array[index]
# good
hash[ :key ]
array[ index ]