Showing 829 of 829 total issues
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
"alert-info"
- 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"
Extra empty line detected at class body beginning. Open
Open
# Include RMagick or MiniMagick support:
- Read upRead up
- Exclude checks
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
Script file Rakefile doesn't have execute permission. Open
Open
#!/usr/bin/env rake
- Exclude checks
Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem coffee-rails
should appear before sass-rails
. Open
Open
gem 'coffee-rails', '~> 3.2.2'
- Read upRead up
- Exclude checks
Gems should be alphabetically sorted within groups.
Example:
# bad
gem 'rubocop'
gem 'rspec'
# good
gem 'rspec'
gem 'rubocop'
# good
gem 'rubocop'
gem 'rspec'
# good only if TreatCommentsAsGroupSeparators is true
# For code quality
gem 'rubocop'
# For tests
gem 'rspec'
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
Open
border-bottom: 1px solid rgba(0, 0, 0, 0.18);
- Exclude checks
Prefer single quoted strings Open
Open
@import "globals/functions";
- Exclude checks
Color green
should be written in hexadecimal form as #008000
Open
Open
color: green;
- Exclude checks
Avoid using id selectors Open
Open
#push {
- Exclude checks
Properties should be ordered height, margin, min-height Open
Open
min-height: 100%;
- Exclude checks
0px
should be written without units as 0
Open
Open
padding: 20px 0px 30px 0px;
- Exclude checks
0px
should be written without units as 0
Open
Open
padding: 5px 0px;
- Exclude checks
Color literals like rgb(42, 43, 43)
should only be used in variable declarations; they should be referred to via variable everywhere else. Open
Open
color: rgb(42, 43, 43);
- Exclude checks
Properties should be ordered background-color, border, height, margin-bottom, padding Open
Open
height: 35px;
- Exclude checks
Space inside string interpolation detected. Open
Open
content_tag(:div, "Found #{ properties.total_count } property listings with this search criteria'",
- Read upRead up
- Exclude checks
This cop checks for whitespace within string interpolations.
Example: EnforcedStyle: no_space (default)
# bad
var = "This is the #{ space } example"
# good
var = "This is the #{no_space} example"
Example: EnforcedStyle: space
# bad
var = "This is the #{no_space} example"
# good
var = "This is the #{ space } example"
0.2
should be written without a leading zero as .2
Open
Open
margin-bottom: 0.2em;
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
session["devise.user_attributes"] = user.attributes
- 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"
Prefer single quoted strings Open
Open
@import "globals/colors";
- Exclude checks
Line is too long. [87/80] Open
Open
@compares_quicklist = Property.includes(:images).find(session[:compare_list] || [])
- Exclude checks
Missing top-level class documentation comment. Open
Open
class PropertiesController < ApplicationController
- 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
Color literals like #bbb
should only be used in variable declarations; they should be referred to via variable everywhere else. Open
Open
@include box-shadow(0px 1px 6px #bbb);
- Exclude checks