Showing 829 of 829 total issues
Selector latest_properties
should be written in lowercase with hyphens Open
.latest_properties {
- Exclude checks
Each selector in a comma sequence should be on its own single line Open
#form-login, #form-signup {
- Exclude checks
Colon after property should be followed by one space Open
top:28px;
- Exclude checks
Missing top-level class documentation comment. Open
class PagesController < 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 #676767
should only be used in variable declarations; they should be referred to via variable everywhere else. Open
color: #676767;
- Exclude checks
Color literals like #fff
should only be used in variable declarations; they should be referred to via variable everywhere else. Open
background:#fff;
- Exclude checks
Align else
with if
. Open
else
- Read upRead up
- Exclude checks
This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.
Example:
# bad
if something
code
else
code
end
# bad
if something
code
elsif something
code
end
# good
if something
code
else
code
end
Rule declaration should be preceded by an empty line Open
.navbar, .navbar-inner, .nav, .navbar-inverse {
- Exclude checks
Line is too long. [87/80] Open
@favs_quicklist = current_user.favorites.includes(:images).limit(4) if current_user
- Exclude checks
Each selector in a comma sequence should be on its own single line Open
.navbar, .navbar-inner, .nav, .navbar-inverse {
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
%w[asc desc].include?(params[:sort]) ? params[:sort] : "asc"
- 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"
0.9
should be written without a leading zero as .9
Open
font-size: 0.9em;
- Exclude checks
Align the parameters of a method call if they span more than one line. Open
notice: 'You should add a listing to compare list'
- Read upRead up
- Exclude checks
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
0.9
should be written without a leading zero as .9
Open
background-color: rgba(42, 43, 43, 0.9);
- Exclude checks
Missing top-level class documentation comment. Open
class ComparesController < 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
Expected item on line 71 to appear before line 70. Rule sets should be ordered as follows: @extends
, @includes
without @content
, properties, @includes
with @content
, nested rule sets Open
@include box-shadow(0px 1px 5px rgba(185, 188, 194, 0.8));
- Exclude checks
Use //
comments everywhere Open
/*font-size: 120%;*/
- Exclude checks
Line is too long. [127/80] Open
raise(ArgumentError, "A CarrierWave::Uploader::Base object was expected") unless value.kind_of? CarrierWave::Uploader::Base
- Exclude checks
0px
should be written without units as 0
Open
margin: 0px;
- Exclude checks
Use %i
or %I
for an array of symbols. Open
RESERVED_OPTIONS = [:minimum, :maximum, :within, :is, :tokenizer, :too_short, :too_long]
- Read upRead up
- Exclude checks
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 of
3` 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]