georgebellos/real_estate

View on GitHub

Showing 829 of 829 total issues

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

    %w[asc desc].include?(params[:sort]) ? params[:sort] : "asc"

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 alias instead of alias_method in a class body.
Open

  alias_method :twitter, :all

This cop enforces the use of either #alias or #alias_method depending on configuration. It also flags uses of alias :symbol rather than alias bareword.

Example: EnforcedStyle: prefer_alias (default)

# bad
alias_method :bar, :foo
alias :bar :foo

# good
alias bar foo

Example: EnforcedStyle: preferaliasmethod

# bad
alias :bar :foo
alias bar foo

# good
alias_method :bar, :foo

Prefer single quoted strings
Open

@import "bootstrap/navbar";

0px should be written without units as 0
Open

    margin: 0px;

Align the parameters of a method call if they span more than one line.
Open

        notice:  'You can compare at most 3 listings. Please remove a listing from compare list'

Here we check if the parameters on a multi-line method call or definition are aligned.

Example: EnforcedStyle: withfirstparameter (default)

# good

foo :bar,
    :baz

# bad

foo :bar,
  :baz

Example: EnforcedStyle: withfixedindentation

# good

foo :bar,
  :baz

# bad

foo :bar,
    :baz

Use alias instead of alias_method in a class body.
Open

  alias_method :facebook, :all

This cop enforces the use of either #alias or #alias_method depending on configuration. It also flags uses of alias :symbol rather than alias bareword.

Example: EnforcedStyle: prefer_alias (default)

# bad
alias_method :bar, :foo
alias :bar :foo

# good
alias bar foo

Example: EnforcedStyle: preferaliasmethod

# bad
alias :bar :foo
alias bar foo

# good
alias_method :bar, :foo

Extra empty line detected at class body beginning.
Open


  def create

This cops checks if empty lines around the bodies of classes match the configuration.

Example: EnforcedStyle: empty_lines

# good

class Foo

  def bar
    # ...
  end

end

Example: EnforcedStyle: emptylinesexcept_namespace

# good

class Foo
  class Bar

    # ...

  end
end

Example: EnforcedStyle: emptylinesspecial

# good
class Foo

  def bar; end

end

Example: EnforcedStyle: noemptylines (default)

# good

class Foo
  def bar
    # ...
  end
end

Color literals like rgb(223, 223, 223) should only be used in variable declarations; they should be referred to via variable everywhere else.
Open

    border-bottom: 1px solid rgb(223, 223, 223);

Prefer single quoted strings
Open

@import "bootstrap/carousel";

0px should be written without units as 0
Open

  padding: 40px 0px;

Space missing to the left of {.
Open

       @properties = session[:compare_list].map{|id| Property.find_by_id(id) }

Checks that block braces have or don't have a space before the opening brace depending on configuration.

Example:

# bad
foo.map{ |a|
  a.bar.to_s
}

# good
foo.map { |a|
  a.bar.to_s
}

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

    user = User.from_omniauth(request.env["omniauth.auth"])

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"

Prefer single quoted strings
Open

@import "globals/placeholders";

Rule declaration should be followed by an empty line
Open

  }

Line is too long. [81/80]
Open

  # Avoid using model.id or version_name here, see uploader/store.rb for details.
Severity: Minor
Found in app/uploaders/picture_uploader.rb by rubocop

Color literals like rgb(92, 92, 92) should only be used in variable declarations; they should be referred to via variable everywhere else.
Open

  background: none repeat scroll 0% 0% rgb(92, 92, 92);

Properties should be ordered margin-top, padding, width
Open

    padding: 10px;

Properties should be ordered font-size, position, right, top
Open

  position: absolute;

Put empty method definitions on a single line.
Open

  def info
  end
Severity: Minor
Found in app/controllers/pages_controller.rb by rubocop

This cop checks for the formatting of empty method definitions. By default it enforces empty method definitions to go on a single line (compact style), but it can be configured to enforce the end to go on its own line (expanded style).

Note: A method definition is not considered empty if it contains comments.

Example: EnforcedStyle: compact (default)

# bad
def foo(bar)
end

def self.foo(bar)
end

# good
def foo(bar); end

def foo(bar)
  # baz
end

def self.foo(bar); end

Example: EnforcedStyle: expanded

# bad
def foo(bar); end

def self.foo(bar); end

# good
def foo(bar)
end

def self.foo(bar)
end

0px should be written without units as 0
Open

    @include box-shadow(0px 1px 3px rgba(42, 43, 43, 0.1));
Severity
Category
Status
Source
Language