georgebellos/real_estate

View on GitHub

Showing 829 of 829 total issues

Don't use parentheses around a method call.
Open

    session[:compare_list].delete((params[:id]).to_i) unless session[:compare_list].nil?

This cop checks for redundant parentheses.

Example:

# bad
(x) if ((y.z).nil?)

# good
x if y.z.nil?

%w-literals should be delimited by [ and ].
Open

    %w(jpg jpeg gif png)
Severity: Minor
Found in app/uploaders/picture_uploader.rb by rubocop

This cop enforces the consistent usage of %-literal delimiters.

Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

Example:

# Style/PercentLiteralDelimiters:
#   PreferredDelimiters:
#     default: '[]'
#     '%i':    '()'

# good
%w[alpha beta] + %i(gamma delta)

# bad
%W(alpha #{beta})

# bad
%I(alpha beta)

Properties should be ordered color, margin-bottom
Open

    margin-bottom: 10px;

0px should be written without units as 0
Open

    left: 0px;

Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.
Open

      next unless check_value = options[key]
Severity: Minor
Found in lib/file_size_validator.rb by rubocop

This cop checks for assignments in the conditions of if/while/until.

Example:

# bad

if some_var = true
  do_something
end

Example:

# good

if some_var == true
  do_something
end

Rule declaration should be followed by an empty line
Open

  }

Use // comments everywhere
Open

    /*font-size: 120%;*/

Line is too long. [91/80]
Open

  RESERVED_OPTIONS  = [:minimum, :maximum, :within, :is, :tokenizer, :too_short, :too_long]
Severity: Minor
Found in lib/file_size_validator.rb by rubocop

Shorthand form for property margin should be written more concisely as 10px auto 30px instead of 10px auto 30px auto
Open

  margin: 10px auto 30px auto;

Avoid vendor prefixes.
Open

    -webkit-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;

Use %i or %I for an array of symbols.
Open

gem 'rspec-rails', '~> 2.13.2', group: [:development, :test]
Severity: Minor
Found in Gemfile by rubocop

This cop can check for array literals made up of symbols that are not using the %i() syntax.

Alternatively, it checks for symbol arrays using the %i() syntax on projects which do not want to use that syntax.

Configuration option: MinSize If set, arrays with fewer elements than this value will not trigger the cop. For example, a MinSize of3` will not enforce a style on an array of 2 or fewer elements.

Example: EnforcedStyle: percent (default)

# good
%i[foo bar baz]

# bad
[:foo, :bar, :baz]

Example: EnforcedStyle: brackets

# good
[:foo, :bar, :baz]

# bad
%i[foo bar baz]

Selector debug_dump should be written in lowercase with hyphens
Open

.debug_dump {

Properties should be ordered border-bottom, border-top, padding
Open

  border-top: 1px solid rgb(255, 255, 255);

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

  border-bottom: 1px solid rgba(0, 0, 0, 0.18);

0.18 should be written without a leading zero as .18
Open

  border-bottom: 1px solid rgba(0, 0, 0, 0.18);

0px should be written without units as 0
Open

  margin: 11px 20px 0px 0px;

Use // comments everywhere
Open

/***  Variables  ***/

Prefer single quoted strings
Open

@import "bootstrap/scaffolding";

Prefer single quoted strings
Open

@import "bootstrap/code";

Each selector in a comma sequence should be on its own single line
Open

.collapsed .caret-category, .caret-category.closed {
Severity
Category
Status
Source
Language