jjeremydiaz/OpenHouse

View on GitHub

Showing 815 of 815 total issues

Trailing whitespace detected.
Open

    
Severity: Minor
Found in app/helpers/search_helper.rb by rubocop

Missing top-level module documentation comment.
Open

module SearchHelper
Severity: Minor
Found in app/helpers/search_helper.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

Trailing whitespace detected.
Open

    
Severity: Minor
Found in app/models/conversation.rb by rubocop

Trailing whitespace detected.
Open

    
Severity: Minor
Found in app/models/conversation.rb by rubocop

Use 2 (not 4) spaces for indentation.
Open

        self.available_time_start ||= '00:00'
Severity: Minor
Found in app/models/user.rb by rubocop

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 User < ActiveRecord::Base
Severity: Minor
Found in app/models/user.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

Surrounding space missing for operator %.
Open

        (((start_hour-1)%12)+1).to_s + range[2..4] + ((start_hour%24)<12?' a.m. - ':' p.m. - ') + (((end_hour-1)%12)+1).to_s + range[8..10] + ((end_hour%24)<12?' a.m.':' p.m.')
Severity: Minor
Found in app/helpers/time_helper.rb by rubocop

Checks that operators have space around them, except for ** which should not have surrounding space.

Example:

# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b

# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b

Surrounding space missing for operator <.
Open

        (((start_hour-1)%12)+1).to_s + range[2..4] + ((start_hour%24)<12?' a.m. - ':' p.m. - ') + (((end_hour-1)%12)+1).to_s + range[8..10] + ((end_hour%24)<12?' a.m.':' p.m.')
Severity: Minor
Found in app/helpers/time_helper.rb by rubocop

Checks that operators have space around them, except for ** which should not have surrounding space.

Example:

# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b

# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b

Line is too long. [114/80]
Open

                @nearby_locations.push([user.latitude, user.longitude, user.price, user.home_street_address, url])
Severity: Minor
Found in app/helpers/search_helper.rb by rubocop

Prefer !expression.nil? over expression != nil.
Open

        if result != nil
Severity: Minor
Found in app/helpers/search_helper.rb by rubocop

This cop checks for non-nil checks, which are usually redundant.

Example:

# bad
if x != nil
end

# good (when not allowing semantic changes)
# bad (when allowing semantic changes)
if !x.nil?
end

# good (when allowing semantic changes)
if x
end

Non-nil checks are allowed if they are the final nodes of predicate.

# good
def signed_in?
  !current_user.nil?
end

Trailing whitespace detected.
Open

    
Severity: Minor
Found in app/controllers/users_controller.rb by rubocop

Use 2 (not 4) spaces for indentation.
Open

    belongs_to :conversation
Severity: Minor
Found in app/models/message.rb by rubocop

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

Final newline missing.
Open

end
Severity: Minor
Found in app/models/conversation.rb by rubocop

Use 2 (not 4) spaces for indentation.
Open

        self.available_time_start + "-" + self.available_time_end
Severity: Minor
Found in app/models/user.rb by rubocop

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

Trailing whitespace detected.
Open

  
Severity: Minor
Found in app/helpers/sessions_helper.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

        self.home_street_address + " " + self.home_city + " " + self.home_state + " " + self.home_zip_code
Severity: Minor
Found in app/models/user.rb by rubocop

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"

Use 2 (not 4) spaces for indentation.
Open

            @users.push(user)
Severity: Minor
Found in app/helpers/search_helper.rb by rubocop

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

        self.home_street_address + " " + self.home_city + " " + self.home_state + " " + self.home_zip_code
Severity: Minor
Found in app/models/user.rb by rubocop

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"

Use 2 (not 4) spaces for indentation.
Open

                url = request.base_url + "/users/" + user.id.to_s
Severity: Minor
Found in app/helpers/search_helper.rb by rubocop

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

Trailing whitespace detected.
Open

    
Severity: Minor
Found in app/controllers/users_controller.rb by rubocop
Severity
Category
Status
Source
Language